Enum Constant and Description |
---|
DOCUMENT |
DOCUMENT_PDF |
IMAGE |
UNKNOWN_MEDIATYPE |
Modifier and Type | Method and Description |
---|---|
boolean |
isDocument() |
boolean |
isImage() |
static MediaType |
valueOf(java.lang.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.
|
static MediaType |
withExtension(java.lang.String fileExtension) |
public static final MediaType IMAGE
public static final MediaType DOCUMENT
public static final MediaType DOCUMENT_PDF
public static final MediaType UNKNOWN_MEDIATYPE
public static MediaType[] values()
for (MediaType c : MediaType.values()) System.out.println(c);
public static MediaType 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 MediaType withExtension(java.lang.String fileExtension)
public boolean isImage()
public boolean isDocument()