org.jpublish.util
Class MimeTypeMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--org.jpublish.util.MimeTypeMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class MimeTypeMap
extends java.util.HashMap

Data structure representing a mime type map.

Author:
Anthony Eden
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static java.lang.String DEFAULT_MIME_TYPE
          The default mime type if none is set.
 
Constructor Summary
MimeTypeMap()
           
 
Method Summary
 java.lang.String getDefaultMimeType()
          Get the default mime type.
 java.lang.String getMimeType(java.lang.String extension)
          Get the mime type for the given file extension.
 void setDefaultMimeType(java.lang.String defaultMimeType)
          Set the default mime type.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

DEFAULT_MIME_TYPE

public static final java.lang.String DEFAULT_MIME_TYPE
The default mime type if none is set.
Constructor Detail

MimeTypeMap

public MimeTypeMap()
Method Detail

getMimeType

public java.lang.String getMimeType(java.lang.String extension)
Get the mime type for the given file extension.
Returns:
The mime type

getDefaultMimeType

public java.lang.String getDefaultMimeType()
Get the default mime type.
Returns:
The default mime type

setDefaultMimeType

public void setDefaultMimeType(java.lang.String defaultMimeType)
Set the default mime type.
Parameters:
defaultMimeType - The new default mime type


Copyright (C) 2001 Anthony Eden. All Rights Reserved.