public final class MimeTypes extends Object
mime.txt
project file.Modifier and Type | Field and Description |
---|---|
static String |
APP_FORM_URLENCODED
Media type: application/x-www-form-urlencoded.
|
static String |
APP_HTML_XML
Media type: application/html+xml.
|
static String |
APP_JSON
Media type: application/json.
|
static String |
APP_JSONML
Media type: application/jsonml+json.
|
static String |
APP_OCTET
Media type: text/plain.
|
static String |
APP_XML
Media type: application/xml.
|
static String |
MULTIPART_FORM_DATA
Media type: multipart/form-data.
|
static String |
TEXT_CSV
Media type: text/comma-separated-values.
|
static String |
TEXT_HTML
Media type: text/html.
|
static String |
TEXT_PLAIN
Media type: text/plain.
|
Modifier and Type | Method and Description |
---|---|
static String |
get(String path)
Returns the mime type for the suffix of the specified file path.
|
static boolean |
isJSON(String type)
Checks if the mime type is a JSON mime type.
|
static boolean |
isMultipart(String type)
Checks if the mime type is a multipart mime type.
|
static boolean |
isText(String type)
Checks if the main part of the mime type is
"text" . |
static boolean |
isXML(String type)
Checks if the mime type is an XML mime type.
|
static boolean |
isXQuery(String type)
Checks if the mime type is an XQuery mime type.
|
static boolean |
matches(String type,
String pattern)
Checks if a mime type is accepted by the specified pattern.
|
public static final String MULTIPART_FORM_DATA
public static final String APP_HTML_XML
public static final String APP_JSON
public static final String APP_JSONML
public static final String APP_OCTET
public static final String APP_XML
public static final String APP_FORM_URLENCODED
public static final String TEXT_CSV
public static final String TEXT_HTML
public static final String TEXT_PLAIN
public static String get(String path)
application/octet-stream
is returned if no type is found.path
- path to be checkedpublic static boolean isXQuery(String type)
type
- mime typepublic static boolean isXML(String type)
type
- mime typepublic static boolean isJSON(String type)
type
- mime typepublic static boolean isText(String type)
"text"
.type
- mime typepublic static boolean isMultipart(String type)
type
- mime typeCopyright © 2005–2015 BaseX Team. All rights reserved.