org.mortbay.jetty
Class MimeTypes
java.lang.Object
org.mortbay.jetty.MimeTypes
public class MimeTypes
- extends Object
- Author:
- Greg Wilkins
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORM_ENCODED
public static final String FORM_ENCODED
- See Also:
- Constant Field Values
MESSAGE_HTTP
public static final String MESSAGE_HTTP
- See Also:
- Constant Field Values
MULTIPART_BYTERANGES
public static final String MULTIPART_BYTERANGES
- See Also:
- Constant Field Values
TEXT_HTML
public static final String TEXT_HTML
- See Also:
- Constant Field Values
TEXT_PLAIN
public static final String TEXT_PLAIN
- See Also:
- Constant Field Values
TEXT_XML
public static final String TEXT_XML
- See Also:
- Constant Field Values
TEXT_HTML_8859_1
public static final String TEXT_HTML_8859_1
- See Also:
- Constant Field Values
TEXT_PLAIN_8859_1
public static final String TEXT_PLAIN_8859_1
- See Also:
- Constant Field Values
TEXT_XML_8859_1
public static final String TEXT_XML_8859_1
- See Also:
- Constant Field Values
TEXT_HTML_UTF_8
public static final String TEXT_HTML_UTF_8
- See Also:
- Constant Field Values
TEXT_PLAIN_UTF_8
public static final String TEXT_PLAIN_UTF_8
- See Also:
- Constant Field Values
TEXT_XML_UTF_8
public static final String TEXT_XML_UTF_8
- See Also:
- Constant Field Values
CACHE
public static final BufferCache CACHE
FORM_ENCODED_BUFFER
public static final BufferCache.CachedBuffer FORM_ENCODED_BUFFER
MESSAGE_HTTP_BUFFER
public static final BufferCache.CachedBuffer MESSAGE_HTTP_BUFFER
MULTIPART_BYTERANGES_BUFFER
public static final BufferCache.CachedBuffer MULTIPART_BYTERANGES_BUFFER
TEXT_HTML_BUFFER
public static final BufferCache.CachedBuffer TEXT_HTML_BUFFER
TEXT_PLAIN_BUFFER
public static final BufferCache.CachedBuffer TEXT_PLAIN_BUFFER
TEXT_XML_BUFFER
public static final BufferCache.CachedBuffer TEXT_XML_BUFFER
TEXT_HTML_8859_1_BUFFER
public static final BufferCache.CachedBuffer TEXT_HTML_8859_1_BUFFER
TEXT_PLAIN_8859_1_BUFFER
public static final BufferCache.CachedBuffer TEXT_PLAIN_8859_1_BUFFER
TEXT_XML_8859_1_BUFFER
public static final BufferCache.CachedBuffer TEXT_XML_8859_1_BUFFER
TEXT_HTML_UTF_8_BUFFER
public static final BufferCache.CachedBuffer TEXT_HTML_UTF_8_BUFFER
TEXT_PLAIN_UTF_8_BUFFER
public static final BufferCache.CachedBuffer TEXT_PLAIN_UTF_8_BUFFER
TEXT_XML_UTF_8_BUFFER
public static final BufferCache.CachedBuffer TEXT_XML_UTF_8_BUFFER
MimeTypes
public MimeTypes()
- Constructor.
getMimeMap
public Map getMimeMap()
setMimeMap
public void setMimeMap(Map mimeMap)
- Parameters:
mimeMap
- A Map of file extension to mime-type.
getMimeByExtension
public Buffer getMimeByExtension(String filename)
- Get the MIME type by filename extension.
- Parameters:
filename
- A file name
- Returns:
- MIME type matching the longest dot extension of the
file name.
addMimeMapping
public void addMimeMapping(String extension,
String type)
- Set a mime mapping
- Parameters:
extension
- type
-
getCharsetFromContentType
public static String getCharsetFromContentType(Buffer value)