dsto.dfc.net
Class DfcFileNameMap
java.lang.Object
dsto.dfc.net.DfcFileNameMap
- All Implemented Interfaces:
- FileNameMap
public class DfcFileNameMap
- extends Object
- implements FileNameMap
A file name map that allows dynamic mapping of file extensions to
MIME types. Daisy chains to the default system file map if no
mapping is found.
This class is intended to be used to connect file URL's to their
content handler, usually via DfcContentHandlerFactory
.
- Version:
- $Revision$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DfcFileNameMap
public DfcFileNameMap()
registerMap
public static void registerMap()
- Register this class as the system wide file map. May be called
more than once.
registerTypeForExtension
public static void registerTypeForExtension(String extension,
String mimeType)
- Associate a file extension with a MIME type.
- Parameters:
extension
- The extension (without ".").mimeType
- The MIME type for the extension.
getContentTypeFor
public String getContentTypeFor(String fileName)
- Specified by:
getContentTypeFor
in interface FileNameMap
Copyright © 2008 Commonwealth of Australia