code: public static ContentType parse(
              final String s) throws ParseException, UnsupportedCharsetException {
          if (s == null) {
              throw new IllegalArgumentException("Content type may not be null");
          }
          HeaderElement[] elements = BasicHeaderValueParser.parseElements(s, null);
          if (elements.length > 0) {
              return create(elements[0]);
          } else {
              throw new ParseException("Invalid content type: " + s);
          }
      }
docs: Parses textual representation of <code>Content-Type</code> value.
  
  @param s text
  @return content type
  @throws ParseException if the given text does not represent a valid
  <code>Content-Type</code> value.