Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty
Class MimeTypes

    java.lang.Object
      org.mortbay.jetty.MimeTypes

    public class MimeTypes

extends java.lang.Object

Author:
  Greg Wilkins

Field Summary
`static BufferCache` | `CACHE`
`static java.lang.String` | `FORM_ENCODED`
`static BufferCache.CachedBuffer` | `FORM_ENCODED_BUFFER`
`static java.lang.String` | `MESSAGE_HTTP`
`static BufferCache.CachedBuffer` | `MESSAGE_HTTP_BUFFER`
`static java.lang.String` | `MULTIPART_BYTERANGES`
`static BufferCache.CachedBuffer` | `MULTIPART_BYTERANGES_BUFFER`
`static java.lang.String` | `TEXT_HTML`
`static java.lang.String` | `TEXT_HTML_8859_1`
`static BufferCache.CachedBuffer` | `TEXT_HTML_8859_1_BUFFER`
`static BufferCache.CachedBuffer` | `TEXT_HTML_BUFFER`
`static java.lang.String` | `TEXT_HTML_UTF_8`
`static BufferCache.CachedBuffer` | `TEXT_HTML_UTF_8_BUFFER`
`static java.lang.String` | `TEXT_JSON`
`static BufferCache.CachedBuffer` | `TEXT_JSON_BUFFER`
`static java.lang.String` | `TEXT_JSON_UTF_8`
`static BufferCache.CachedBuffer` | `TEXT_JSON_UTF_8_BUFFER`
`static java.lang.String` | `TEXT_PLAIN`
`static java.lang.String` | `TEXT_PLAIN_8859_1`
`static BufferCache.CachedBuffer` | `TEXT_PLAIN_8859_1_BUFFER`
`static BufferCache.CachedBuffer` | `TEXT_PLAIN_BUFFER`
`static java.lang.String` | `TEXT_PLAIN_UTF_8`
`static BufferCache.CachedBuffer` | `TEXT_PLAIN_UTF_8_BUFFER`
`static java.lang.String` | `TEXT_XML`
`static java.lang.String` | `TEXT_XML_8859_1`
`static BufferCache.CachedBuffer` | `TEXT_XML_8859_1_BUFFER`
`static BufferCache.CachedBuffer` | `TEXT_XML_BUFFER`
`static java.lang.String` | `TEXT_XML_UTF_8`
`static BufferCache.CachedBuffer` | `TEXT_XML_UTF_8_BUFFER`

Constructor Summary
`MimeTypes()` Constructor.

Method Summary
`void` | `addMimeMapping(java.lang.String extension, java.lang.String type)` Set a mime mapping
`static java.lang.String` | `getCharsetFromContentType(Buffer value)`
`Buffer` | `getMimeByExtension(java.lang.String filename)` Get the MIME type by filename extension.
`java.util.Map` | `getMimeMap()`
`void` | `setMimeMap(java.util.Map mimeMap)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FORM_ENCODED

    public static final java.lang.String FORM_ENCODED

See Also:
  Constant Field Values

### MESSAGE_HTTP

    public static final java.lang.String MESSAGE_HTTP

See Also:
  Constant Field Values

### MULTIPART_BYTERANGES

    public static final java.lang.String MULTIPART_BYTERANGES

See Also:
  Constant Field Values

### TEXT_HTML

    public static final java.lang.String TEXT_HTML

See Also:
  Constant Field Values

### TEXT_PLAIN

    public static final java.lang.String TEXT_PLAIN

See Also:
  Constant Field Values

### TEXT_XML

    public static final java.lang.String TEXT_XML

See Also:
  Constant Field Values

### TEXT_HTML_8859_1

    public static final java.lang.String TEXT_HTML_8859_1

See Also:
  Constant Field Values

### TEXT_PLAIN_8859_1

    public static final java.lang.String TEXT_PLAIN_8859_1

See Also:
  Constant Field Values

### TEXT_XML_8859_1

    public static final java.lang.String TEXT_XML_8859_1

See Also:
  Constant Field Values

### TEXT_HTML_UTF_8

    public static final java.lang.String TEXT_HTML_UTF_8

See Also:
  Constant Field Values

### TEXT_PLAIN_UTF_8

    public static final java.lang.String TEXT_PLAIN_UTF_8

See Also:
  Constant Field Values

### TEXT_XML_UTF_8

    public static final java.lang.String TEXT_XML_UTF_8

See Also:
  Constant Field Values

### TEXT_JSON

    public static final java.lang.String TEXT_JSON

See Also:
  Constant Field Values

### TEXT_JSON_UTF_8

    public static final java.lang.String TEXT_JSON_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

### TEXT_JSON_BUFFER

    public static final BufferCache.CachedBuffer TEXT_JSON_BUFFER

### TEXT_JSON_UTF_8_BUFFER

    public static final BufferCache.CachedBuffer TEXT_JSON_UTF_8_BUFFER

Constructor Detail

### MimeTypes

    public MimeTypes()

  Constructor.

Method Detail

### getMimeMap

    public java.util.Map getMimeMap()

### setMimeMap

    public void setMimeMap(java.util.Map mimeMap)

  Parameters:
    `mimeMap` - A Map of file extension to mime-type.

### getMimeByExtension

    public Buffer getMimeByExtension(java.lang.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(java.lang.String extension,
                               java.lang.String type)

  Set a mime mapping

  Parameters:
    `extension` -
    `type` -

### getCharsetFromContentType

    public static java.lang.String getCharsetFromContentType(Buffer value)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.