Package ch.squaredesk.nova.comm.http
Enum MediaType
- java.lang.Object
-
- java.lang.Enum<MediaType>
-
- ch.squaredesk.nova.comm.http.MediaType
-
- All Implemented Interfaces:
Serializable,Comparable<MediaType>
public enum MediaType extends Enum<MediaType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPLICATION_ATOM_XMLAPPLICATION_FORM_URLENCODEDAPPLICATION_JSONAPPLICATION_OCTET_STREAMAPPLICATION_SVG_XMLAPPLICATION_XHTML_XMLAPPLICATION_XMLMULTIPART_FORM_DATATEXT_HTMLTEXT_PLAINTEXT_XML
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MediaTypevalueOf(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.
-
-
-
Enum Constant Detail
-
APPLICATION_XML
public static final MediaType APPLICATION_XML
-
APPLICATION_ATOM_XML
public static final MediaType APPLICATION_ATOM_XML
-
APPLICATION_XHTML_XML
public static final MediaType APPLICATION_XHTML_XML
-
APPLICATION_SVG_XML
public static final MediaType APPLICATION_SVG_XML
-
APPLICATION_JSON
public static final MediaType APPLICATION_JSON
-
APPLICATION_FORM_URLENCODED
public static final MediaType APPLICATION_FORM_URLENCODED
-
MULTIPART_FORM_DATA
public static final MediaType MULTIPART_FORM_DATA
-
APPLICATION_OCTET_STREAM
public static final MediaType APPLICATION_OCTET_STREAM
-
TEXT_PLAIN
public static final MediaType TEXT_PLAIN
-
TEXT_XML
public static final MediaType TEXT_XML
-
TEXT_HTML
public static final MediaType TEXT_HTML
-
-
Field Detail
-
key
public final String key
-
-
Method Detail
-
values
public static MediaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MediaType c : MediaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MediaType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-