All Implemented Interfaces:
Serializable , Comparable <Format >,
Constable
The Format enumerates different kinds of
document content.
Nested Class Summary
Enum Constant Summary
Enum Constants
Identifies the format of binary documents such
as images.
Identifies the format of JSON documents.
Identifies the format of text documents such as
plain text and HTML.
Used for documents with unknown or multiple
formats.
Identifies the format of XML documents such as
XHTML.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Returns the default extension for the
format.
Returns the default mime type for the
format.
Returns the format based on a document data type
as used in Data Services.
Returns the format implied by the mime
type
Returns the enum constant of this class with the
specified name.
Returns an array containing the constants of
this enum class, in the order they are declared.
Methods
inherited from class java.lang.Enum
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
Enum Constant Details
BINARY
public static final Format BINARY
Identifies the format of binary documents such
as images.
JSON
public static final Format JSON
Identifies the format of JSON documents.
TEXT
public static final Format TEXT
Identifies the format of text documents such as
plain text and HTML.
XML
public static final Format XML
Identifies the format of XML documents such as
XHTML.
UNKNOWN
public static final Format UNKNOWN
Used for documents with unknown or multiple
formats.
Method Details
values
public static Format [] values ()
Returns an array containing the constants of
this enum class, in the order they are declared.
Returns:
an array containing the constants of this enum class, in the
order they are declared
valueOf
Returns the enum constant of this class with the
specified name. The string must match exactly an identifier
used to declare an enum constant in this class. (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
class has no constant with the specified name
NullPointerException - if the argument
is null
getDefaultMimetype
public String getDefaultMimetype ()
Returns the default mime type for the
format.
Returns:
the default mime type
getDefaultExtension
public String getDefaultExtension ()
Returns the default extension for the
format.
Returns:
the default extension
getFromMimetype
Returns the format implied by the mime
type
Parameters:
mimeType - the mime type
Returns:
the format
getFromDataType
Returns the format based on a document data type
as used in Data Services.
Parameters:
dataType - the data type
Returns:
the format
Copyright (c) 2010-2025 Progress
Software Corporation and/or its subsidiaries or affiliates. All
Rights Reserved.