public enum DocumentType extends java.lang.Enum<DocumentType>
Enum Constant and Description |
---|
PDF
Characterizes a pdf document, the default document type.
|
TEXT
Characterizes a text document
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
extension
A default well-known file extension associated with this document
|
private java.lang.String |
mimeType
A standard web document type (MIME) associated with this document
|
Modifier and Type | Method and Description |
---|---|
static DocumentType |
get(java.lang.String name)
Returns a corresponding enumeration constant by its name.
|
java.lang.String |
getExtension()
Returns a file extension for a document having this type.
|
java.lang.String |
getMimeType()
Returns a document's MIME type for a document having this type.
|
static DocumentType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DocumentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DocumentType TEXT
public static final DocumentType PDF
private final java.lang.String mimeType
private final java.lang.String extension
public static DocumentType[] values()
for (DocumentType c : DocumentType.values()) System.out.println(c);
public static DocumentType 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 java.lang.String getMimeType()
public java.lang.String getExtension()
public static DocumentType get(java.lang.String name)
name
- A target constant name