@Test(expected = EncodingException.class) public void testParsingWhitespaceInType() { MediaType.fromString("application /json"); }
@ProtoFactory public static MediaType fromString(String tree) { if (tree == null || tree.isEmpty()) throw CONTAINER.missingMediaType(); Matcher matcher = TREE_PATTERN.matcher(tree); return parseSingleMediaType(tree, matcher, false); }
MediaType { @ProtoFactory public static MediaType fromString(String tree) { if (tree == null || tree.isEmpty()) throw CONTAINER.missingMediaType(); Matcher matcher = TREE_PATTERN.matcher(tree); return parseSingleMediaType(tree, matcher, false); } }
MediaType { @ProtoFactory public static MediaType fromString(String tree) { if (tree == null || tree.isEmpty()) throw CONTAINER.missingMediaType(); Matcher matcher = TREE_PATTERN.matcher(tree); return parseSingleMediaType(tree, matcher, false); } MediaType(String type, String subtype);  MediaType(String type, String subtype, Map<String, String> params);  MediaType(String typeSubtype);  MediaType(String typeSubType, Map<String, String> params); private  MediaType(String typeSubType, int typeLength, Map<String, String> params); }
MediaType { @ProtoFactory public static MediaType fromString(String tree) { if (tree == null || tree.isEmpty()) throw CONTAINER.missingMediaType(); Matcher matcher = TREE_PATTERN.matcher(tree); return parseSingleMediaType(tree, matcher, false); } MediaType(String type, String subtype);  MediaType(String type, String subtype, Map<String, String> params);  MediaType(String typeSubtype);  MediaType(String typeSubType, Map<String, String> params); private  MediaType(String typeSubType, int typeLength, Map<String, String> params); @Deprecated static MediaType parse(String str); @ProtoFactory static MediaType fromString(String tree); static Stream<MediaType> parseList(String mediaTypeList); boolean match(MediaType other); boolean matchesAll(); String getTypeSubtype(); MediaType withoutParameters(); double getWeight(); Charset getCharset(); String getClassType(); MediaType withClassType(Class<?> clazz); boolean hasStringType(); @Override boolean equals(Object o); @Override int hashCode(); String getType(); String getSubType(); boolean hasParameters(); Optional<String> getParameter(String name); Map<String, String> getParameters(); MediaType withParameters(Map<String, String> parameters); MediaType withCharset(Charset charset); MediaType withParameter(String name, String value); String toStringExcludingParam(String... params); boolean isBinary(); @Override String toString(); }
MediaType { @ProtoFactory public static MediaType fromString(String tree) { if (tree == null || tree.isEmpty()) throw CONTAINER.missingMediaType(); Matcher matcher = TREE_PATTERN.matcher(tree); return parseSingleMediaType(tree, matcher, false); } MediaType(String type, String subtype);  MediaType(String type, String subtype, Map<String, String> params);  MediaType(String typeSubtype);  MediaType(String typeSubType, Map<String, String> params); private  MediaType(String typeSubType, int typeLength, Map<String, String> params); @Deprecated static MediaType parse(String str); @ProtoFactory static MediaType fromString(String tree); static Stream<MediaType> parseList(String mediaTypeList); boolean match(MediaType other); boolean matchesAll(); String getTypeSubtype(); MediaType withoutParameters(); double getWeight(); Charset getCharset(); String getClassType(); MediaType withClassType(Class<?> clazz); boolean hasStringType(); @Override boolean equals(Object o); @Override int hashCode(); String getType(); String getSubType(); boolean hasParameters(); Optional<String> getParameter(String name); Map<String, String> getParameters(); MediaType withParameters(Map<String, String> parameters); MediaType withCharset(Charset charset); MediaType withParameter(String name, String value); String toStringExcludingParam(String... params); boolean isBinary(); @Override String toString(); static final String APPLICATION_OPENMETRICS_TYPE; static final String APPLICATION_JAVASCRIPT_TYPE; static final String APPLICATION_JSON_TYPE; static final String APPLICATION_OCTET_STREAM_TYPE; static final String APPLICATION_OBJECT_TYPE; static final String APPLICATION_PDF_TYPE; static final String APPLICATION_RTF_TYPE; static final String APPLICATION_SERIALIZED_OBJECT_TYPE; static final String APPLICATION_XML_TYPE; static final String APPLICATION_ZIP_TYPE; static final String APPLICATION_JBOSS_MARSHALLING_TYPE; static final String APPLICATION_PROTOSTREAM_TYPE; @Deprecated
   static final String APPLICATION_UNKNOWN_TYPE; static final String WWW_FORM_URLENCODED_TYPE; static final String IMAGE_GIF_TYPE; static final String IMAGE_JPEG_TYPE; static final String IMAGE_PNG_TYPE; static final String MULTIPART_FORM_DATA_TYPE; static final String TEXT_CSS_TYPE; static final String TEXT_CSV_TYPE; static final String TEXT_PLAIN_TYPE; static final String TEXT_HTML_TYPE; @Deprecated
   static final String APPLICATION_INFINISPAN_MARSHALLING_TYPE; @Deprecated
   static final String APPLICATION_INFINISPAN_BINARY_TYPE; static final String APPLICATION_PROTOSTUFF_TYPE; static final String APPLICATION_KRYO_TYPE; static final String MATCH_ALL_TYPE; static final MediaType APPLICATION_OPENMETRICS; static final MediaType APPLICATION_JAVASCRIPT; static final MediaType APPLICATION_JSON; static final MediaType APPLICATION_OCTET_STREAM; static final MediaType APPLICATION_OBJECT; static final MediaType APPLICATION_SERIALIZED_OBJECT; static final MediaType APPLICATION_XML; static final MediaType APPLICATION_PROTOSTREAM; static final MediaType APPLICATION_JBOSS_MARSHALLING; @Deprecated
   static final MediaType APPLICATION_INFINISPAN_MARSHALLED; static final MediaType APPLICATION_WWW_FORM_URLENCODED; static final MediaType IMAGE_PNG; static final MediaType MULTIPART_FORM_DATA; static final MediaType TEXT_PLAIN; static final MediaType TEXT_CSS; static final MediaType TEXT_CSV; static final MediaType TEXT_HTML; static final MediaType IMAGE_GIF; static final MediaType IMAGE_JPEG; static final MediaType APPLICATION_PROTOSTUFF; static final MediaType APPLICATION_KRYO; @Deprecated
   static final MediaType APPLICATION_INFINISPAN_BINARY; static final MediaType APPLICATION_PDF; static final MediaType APPLICATION_RTF; static final MediaType APPLICATION_ZIP; @Deprecated
   static final MediaType APPLICATION_INFINISPAN_MARSHALLING; @Deprecated
   static final MediaType APPLICATION_UNKNOWN; static final MediaType MATCH_ALL; static final String BYTE_ARRAY_TYPE; }