MimeType mime = cm.getPreferredType();
String characterSet = JetspeedResources.getString(JetspeedResources.CONTENT_ENCODING_KEY,"utf-8");
data.setContentType( mime.getContentType());
if ( mime != null )
{
MediaTypeEntry media = (MediaTypeEntry)Registry.getEntry(Registry.MEDIA_TYPE, mime.getCode());
if ( media != null && media.getCharacterSet() != null)
{
characterSet = media.getCharacterSet();
}
}
data.setCharSet( characterSet );
if (logger.isDebugEnabled())