guava/src/com/google/common/net/MediaType.java
public static MediaType create(String type, String subtype) {
    MediaType mediaType = create(type, subtype, ImmutableListMultimap.<String, String>of());
    mediaType.parsedCharset = Optional.absent();
    return mediaType;
  }
public static MediaType create(String type, String subtype) {
    MediaType mediaType = create(type, subtype, ImmutableListMultimap.<String, String>of());
    mediaType.parsedCharset = Optional.absent();
    return mediaType;
  }
public static MediaType create ( String type , String subtype ) { MediaType mediaType = create ( type , subtype , ImmutableListMultimap . < String , String > of ( ) ) ; mediaType . parsedCharset = Optional . absent ( ) ; return mediaType ; }
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.
Creates a new media type with the given type and subtype .