code: private static final String stripParams(String mediaType) {
      int sc = mediaType.indexOf(';');
      if (sc >= 0) mediaType = mediaType.substring(0, sc);
      return mediaType;
    }
docs: Strips the parameters from the end of a mediaType description.
  @param mediaType The text in a Content-Type header.
  @return The content type string without any parameters.