public class MimeTypes extends Object
Extra types are added in the "mimetype.ini" file in the Server directory.
For more information about Internet media types, please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type registry is at "ftp://ftp.iana.org/in-notes/iana/assignments/media-types/".
Modifier and Type | Field and Description |
---|---|
static String |
HTML_DOCUMENT_MIME_TYPE
The HTML document MIME type ("text/html").
|
static String |
HTML_FORM_REPLY_MIME_TYPE
The HTML form MIME type.
|
static String |
JNLP_DOCUMENT_MIME_TYPE
The JNLP document MIME type ("application/x-java-jnlp-file").
|
static String |
XML_DOCUMENT_MIME_TYPE
The XML document MIME type ("text/xml").
|
Constructor and Description |
---|
MimeTypes()
Creates the Mime Type class instance used by the web server.
|
Modifier and Type | Method and Description |
---|---|
String |
getMimeType(String fileExtension)
Gets the MIME type for a file extension.
|
static boolean |
isFormReply(String mimeType)
Checks if a type is a form reply, i.e.
|
boolean |
isHTML(String fileExtension)
Checks if a file extension is of HTML type.
|
boolean |
isXML(String fileExtension)
Checks if a file extension is of XML type.
|
public static final String HTML_DOCUMENT_MIME_TYPE
public static final String XML_DOCUMENT_MIME_TYPE
public static final String JNLP_DOCUMENT_MIME_TYPE
public static final String HTML_FORM_REPLY_MIME_TYPE
java.net.URLEncoder.encode
method, decoded with the InternetCharacterConversion.urlDecode
method.public MimeTypes() throws IOException
IOException
- if the MIME type table "mimetype.ini" cannot be loaded.public static boolean isFormReply(String mimeType)
public String getMimeType(String fileExtension)
public boolean isHTML(String fileExtension)
public boolean isXML(String fileExtension)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.