Creates a new media type with the given type and subtype. @throws IllegalArgumentException if type or subtype is invalid or if a wildcard is used for the type, but not the subtype.
(String type, String subtype)
| 1001 | * type, but not the subtype. |
| 1002 | */ |
| 1003 | public static MediaType create(String type, String subtype) { |
| 1004 | MediaType mediaType = create(type, subtype, ImmutableListMultimap.<String, String>of()); |
| 1005 | mediaType.parsedCharset = Optional.absent(); |
| 1006 | return mediaType; |
| 1007 | } |
| 1008 | |
| 1009 | private static MediaType create( |
| 1010 | String type, String subtype, Multimap<String, String> parameters) { |