public AlfrescoMimeMultipart(String subtype, FileInfo messageFileInfo) {
   super();
   String boundary = getBoundaryValue(messageFileInfo);
   ContentType cType = new ContentType("multipart", subtype, null);
   cType.setParameter("boundary", boundary);
   contentType = cType.toString();
 }
 private ContentType getContentType(Exchange exchange) throws ParseException {
   String contentTypeStr = ExchangeHelper.getContentType(exchange);
   if (contentTypeStr == null) {
     contentTypeStr = DEFAULT_CONTENT_TYPE;
   }
   ContentType contentType = new ContentType(contentTypeStr);
   String contentEncoding = ExchangeHelper.getContentEncoding(exchange);
   // add a charset parameter for text subtypes
   if (contentEncoding != null && contentType.match("text/*")) {
     contentType.setParameter("charset", MimeUtility.mimeCharset(contentEncoding));
   }
   return contentType;
 }