MimeMap (Tomcat API Documentation)
Keywords: org.apache.tomcat.util.http.MimeMap class

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

## org.apache.tomcat.util.http
Class MimeMap

    java.lang.Object
      org.apache.tomcat.util.http.MimeMap

All Implemented Interfaces:
  java.net.FileNameMap

    public class MimeMap

extends java.lang.Object
implements java.net.FileNameMap

A mime type map that implements the java.net.FileNameMap interface.

Author:
  James Duncan Davidson [duncan@eng.sun.com], Jason Hunter [jch@eng.sun.com]

Field Summary
`static java.util.Hashtable<java.lang.String,java.lang.String>` | `defaultMap`

Constructor Summary
`MimeMap()`

Method Summary
`void` | `addContentType(java.lang.String extn, java.lang.String type)`
`java.lang.String` | `getContentType(java.lang.String extn)`
`java.lang.String` | `getContentTypeFor(java.lang.String fileName)`
`static java.lang.String` | `getExtension(java.lang.String fileName)` Get extension of file, without fragment id
`java.util.Enumeration` | `getExtensions()`
`void` | `removeContentType(java.lang.String extn)`

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

Field Detail

### defaultMap

    public static java.util.Hashtable<java.lang.String,java.lang.String> defaultMap

Constructor Detail

### MimeMap

    public MimeMap()

Method Detail

### addContentType

    public void addContentType(java.lang.String extn,
                               java.lang.String type)

### getExtensions

    public java.util.Enumeration getExtensions()

### getContentType

    public java.lang.String getContentType(java.lang.String extn)

### removeContentType

    public void removeContentType(java.lang.String extn)

### getExtension

    public static java.lang.String getExtension(java.lang.String fileName)

  Get extension of file, without fragment id

### getContentTypeFor

    public java.lang.String getContentTypeFor(java.lang.String fileName)

  Specified by:
    `getContentTypeFor` in interface `java.net.FileNameMap`

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

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.