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 Object

Author:
  Greg Wilkins

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

Constructor Summary
`MimeTypes()` Constructor.

Method Summary
`void` | `addMimeMapping(String extension, String type)` Set a mime mapping
`static String` | `getCharsetFromContentType(Buffer value)`
`Buffer` | `getMimeByExtension(String filename)` Get the MIME type by filename extension.
`Map` | `getMimeMap()`
`void` | `setMimeMap(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 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

Constructor Detail

### MimeTypes

    public MimeTypes()

  Constructor.

Method Detail

### 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)

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 © 2007 Mort Bay Consulting. All Rights Reserved.