public enum MediaTypeConstant extends java.lang.Enum<MediaTypeConstant> implements MediaType
MEDIA_TYPE_SEPARATOR, MEDIA_TYPE_WILDCARD
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asString()
Returns the string representation (e.g.
|
static MediaTypeConstant |
get(java.lang.String typeDef)
Returns the MediaTypeConstant object for the given type string or null if not found.
|
java.lang.String |
getSubType()
Returns the sub-type (e.g.
|
java.lang.String |
getType()
Returns the main type (e.g.
|
boolean |
isType(java.lang.String typeDef)
Returns true if the given string equals (case-insensitive) the receiver's
string representation.
|
boolean |
isWildcardSubType() |
boolean |
isWildcardType() |
java.lang.String |
toString() |
static MediaTypeConstant |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MediaTypeConstant[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MediaTypeConstant APPLICATION_ATOM_XML
public static final MediaTypeConstant APPLICATION_GRAPHQL
public static final MediaTypeConstant APPLICATION_FORM_URLENCODED
public static final MediaTypeConstant APPLICATION_JSON
public static final MediaTypeConstant APPLICATION_JAVASCRIPT
public static final MediaTypeConstant APPLICATION_MSWORD
public static final MediaTypeConstant APPLICATION_OCTET_STREAM
public static final MediaTypeConstant APPLICATION_PDF
public static final MediaTypeConstant APPLICATION_XHTML_XML
public static final MediaTypeConstant APPLICATION_XML
public static final MediaTypeConstant APPLICATION_ZIP
public static final MediaTypeConstant AUDIO_MPEG
public static final MediaTypeConstant AUDIO_OGG
public static final MediaTypeConstant IMAGE_GIF
public static final MediaTypeConstant IMAGE_JPEG
public static final MediaTypeConstant IMAGE_PNG
public static final MediaTypeConstant MULTIPART_FORM_DATA_TYPE
public static final MediaTypeConstant TEXT_CSS
public static final MediaTypeConstant TEXT_CSV
public static final MediaTypeConstant TEXT_HTML
public static final MediaTypeConstant TEXT_PLAIN
public static final MediaTypeConstant TEXT_XML
public static final MediaTypeConstant WILDCARD_TYPE
public static MediaTypeConstant[] values()
for (MediaTypeConstant c : MediaTypeConstant.values()) System.out.println(c);
public static MediaTypeConstant valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static MediaTypeConstant get(java.lang.String typeDef)
typeDef
- The type definition (e.g. "image/jpg") (must not be null).public java.lang.String asString()
asString
in interface IStringRepresentation
public java.lang.String getType()
MediaType
public java.lang.String getSubType()
MediaType
getSubType
in interface MediaType
public boolean isType(java.lang.String typeDef)
public boolean isWildcardType()
public boolean isWildcardSubType()
public java.lang.String toString()
toString
in class java.lang.Enum<MediaTypeConstant>