| Modifier and Type | Method and Description |
|---|---|
Charset |
charset()
Returns the charset of this media type, or null if this media type doesn't specify a charset.
|
Charset |
charset(Charset
Returns the charset of this media type, or
defaultValue if this media type doesn't specify a charset.
|
boolean |
equals(Object
|
int |
hashCode()
|
static MediaType |
parse(String
Returns a media type for
string, or null if
string is not a well-formed media type.
|
String |
subtype()
Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".
|
String |
toString()
Returns the encoded media type, like "text/plain; charset=utf-8", appropriate for use in a Content-Type header.
|
String |
type()
Returns the high-level media type, such as "text", "image", "audio", "video", or "application".
|
public static MediaTypeparse(String string)
string, or null if
string is not a well-formed media type.
public Stringtype()
public Stringsubtype()
public Charsetcharset()
public Charsetcharset(Charset defaultValue)
defaultValue if this media type doesn't specify a charset.
public StringtoString()
public boolean equals(Objecto)
public int hashCode()