public enum MediaType extends Enum<MediaType>
| Enum Constant and Description |
|---|
ANY
Any.
|
APP_JS
application/javascript |
APP_JSON
application/json |
APP_XHTML
application/xhtml+xml |
APP_XML
application/xml |
BINARY
application/octet-stream |
HTML
text/html |
TEXT_JS
text/javascript |
TEXT_JSON
text/json |
TEXT_PLAIN
text/plain |
TEXT_XML
text/xml |
URLENC
application/x-www-form-urlencoded |
| Modifier and Type | Method and Description |
|---|---|
String |
toString() |
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 ANY
public static final MediaType APP_JS
application/javascriptpublic static final MediaType APP_JSON
application/jsonpublic static final MediaType APP_XHTML
application/xhtml+xmlpublic static final MediaType APP_XML
application/xmlpublic static final MediaType BINARY
application/octet-streampublic static final MediaType HTML
text/htmlpublic static final MediaType TEXT_JS
text/javascriptpublic static final MediaType TEXT_JSON
text/jsonpublic static final MediaType TEXT_PLAIN
text/plainpublic static final MediaType TEXT_XML
text/xmlpublic static final MediaType URLENC
application/x-www-form-urlencodedpublic 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 nullCopyright © 2017–2018 Wasiq Bhamla. All rights reserved.