public abstract class DataFormat
extends java.lang.Object
Format constants for use with data protocols.
Modifier and Type | Field and Description |
---|---|
static int |
ATOM
Represents the ATOM data format.
|
static int |
HTML
Represents the HTML data format.
|
static int |
JSON
Represents the JSON data format.
|
static int |
TEXT
Represents the plain text format (MIME type "text/plain").
|
static int |
XML
Represents the XML data format.
|
Constructor and Description |
---|
DataFormat() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getName(int format)
Return the simple name of the specified data format (e.g.
|
static java.lang.String |
mediaType(int format)
Return the MIME type for the specified data format (e.g.
|
public static final int ATOM
Represents the ATOM data format.
public static final int JSON
Represents the JSON data format.
public static final int HTML
Represents the HTML data format.
public static final int TEXT
Represents the plain text format (MIME type "text/plain").
public static final int XML
Represents the XML data format.
public static java.lang.String getName(int format)
Return the simple name of the specified data format (e.g. "atom", "json", "html", "xml").
format
- Data format.public static java.lang.String mediaType(int format)
Return the MIME type for the specified data format (e.g. "application/json;charset=utf-8").
format
- Data format.