code: private ContentType parseContentType(String value) {
          String[] pcs = value.split("\\;");
          String mimeType = pcs[0].trim();
          String charSet = "UTF-8";
          
          for (int i = 1; i < pcs.length; i++) {
              String s = pcs[i].trim().toUpperCase();
              
              if (s.startsWith("CHARSET=")) {
                  charSet = s.substring(8);
                  break;
              }
          }
          
          return ContentType.create(mimeType, charSet);
      }
docs: Parse the returned content type.
  
  @param value Value to parse
  @return ContentType instance