// will set to UTF-8 if there isn't a charset
m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
ContextResolver<XmlFormattingOptions> contextResolver =
providers.getContextResolver(XmlFormattingOptions.class, mediaType);
XmlFormattingOptions formatingOptions = null;
if (contextResolver != null) {
formatingOptions = contextResolver.getContext(type);
}
if (formatingOptions != null) {
JAXBUtils.setXmlFormattingOptions(m, formatingOptions);