Exemplo n.º 1
0
 /**
  * Use the MimeType class to extract the MIME type/subtype, ignoring the parameters. The type is
  * cached.
  */
 private synchronized String getBaseType() {
   if (shortType == null) {
     String ct = getContentType();
     try {
       MimeType mt = new MimeType(ct);
       shortType = mt.getBaseType();
     } catch (MimeTypeParseException e) {
       shortType = ct;
     }
   }
   return shortType;
 }