code: public static MediaType fromString(String value) {
          if (value == null) {
              throw new NullPointerException("value");
          }
          List<ParameterizedHeaderWithValue> headerValues = ParameterizedHeaderWithValue.fromString(value);
          if (headerValues.isEmpty()) {
              throw new IllegalArgumentException("The value '" + value + "' did not contain a valid header value");
          }
          ParameterizedHeaderWithValue v = headerValues.get(0);
          String[] split = v.value().split("/");
          if (split.length != 2) {
              throw new IllegalArgumentException("Media types must be in the format 'type/subtype'; this is inavlid: '" + v.value() + "'");
          }
          return new MediaType(split[0], split[1], v.parameters());
      }
docs: Converts a string such as "text/plain" into a MediaType object.
  @param value The value to parse
  @return A MediaType object