public enum MediaType extends Enum<MediaType>
Enum Constant and Description |
---|
APPLICATION_FORM_URLENCODED
application/x-www-form-urlencoded media type
|
APPLICATION_JSON
application/json media type
|
APPLICATION_JSON_UTF8
application/json media type with UTF8 charset parameter
|
APPLICATION_OCTET_STREAM
application/octet-stream media type
|
APPLICATION_PDF
application/pdf media type
|
APPLICATION_SVG_XML
application/svg+xml media type
|
APPLICATION_XML
application/xml media type
|
IMAGE_GIF
image/gif media type
|
IMAGE_JPEG
image/jpeg media type
|
IMAGE_PNG
image/png media type
|
MULTIPART_FORM_DATA
multipart/form-data media type
|
TEXT_HTML
text/html media type
|
TEXT_MARKDOWN
text/markdown media type
|
TEXT_PLAIN
text/plain media type
|
TEXT_XML
text/xml media type
|
WILDCARD
Wildcard media type
|
Modifier and Type | Method and Description |
---|---|
String |
getParameters()
Get media type parameters string
|
String |
getSubtype()
Gets the sub type
|
String |
getType()
Gets the primary type
|
String |
toString()
Returns the media type representation in the conventional HTTP header form, i.e.
|
static MediaType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MediaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MediaType WILDCARD
public static final MediaType TEXT_PLAIN
public static final MediaType TEXT_XML
public static final MediaType TEXT_HTML
public static final MediaType TEXT_MARKDOWN
public static final MediaType APPLICATION_JSON
public static final MediaType APPLICATION_JSON_UTF8
public static final MediaType APPLICATION_FORM_URLENCODED
public static final MediaType MULTIPART_FORM_DATA
public static final MediaType APPLICATION_XML
public static final MediaType APPLICATION_SVG_XML
public static final MediaType APPLICATION_OCTET_STREAM
public static final MediaType APPLICATION_PDF
public static final MediaType IMAGE_GIF
public static final MediaType IMAGE_JPEG
public static final MediaType IMAGE_PNG
public static MediaType[] values()
for (MediaType c : MediaType.values()) System.out.println(c);
public static MediaType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getType()
public String getSubtype()
public String getParameters()
null
if noneCopyright © 2019 The Holon Platform. All rights reserved.