com.ithit.webdav.server
Class MimeType

java.lang.Object
  extended by com.ithit.webdav.server.MimeType

public class MimeType
extends java.lang.Object

Provides functionality for getting mime type by file extension.


Method Summary
 void ExtendTypesTable(java.lang.String extension, java.lang.String mimeType)
          Extends the list of content types or replaces existing value with a new one.
static MimeType getInstance()
           
 java.lang.String getMimeType(java.lang.String extension)
          Returns the mime type corresponding to file extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MimeType getInstance()

ExtendTypesTable

public void ExtendTypesTable(java.lang.String extension,
                             java.lang.String mimeType)
Extends the list of content types or replaces existing value with a new one.

Parameters:
extension - File extension.
mimeType - File mime type.

getMimeType

public java.lang.String getMimeType(java.lang.String extension)
Returns the mime type corresponding to file extension.

Parameters:
extension - File extension.
Returns:
String representing mime-type or null if mime-type was not found for the specified extension.


Copyright © 2009 ITHit. All Rights Reserved.