javax.activation
Class FileTypeMap
java.lang.Object
javax.activation.FileTypeMap
public abstract class FileTypeMap
extends java.lang.Object
FileTypeMap is an abstract class that provides a data type interface for files.
FileTypeMap
public FileTypeMap()
getContentType
public abstract String getContentType(File file)
getContentType
public abstract String getContentType(String filename)
getDefaultFileTypeMap
public static FileTypeMap getDefaultFileTypeMap()
Returns the default FileTypeMap
- the default FileTYpeMap; if null returns a MimetypesFileTypeMap
setDefaultFileTypeMap
public static void setDefaultFileTypeMap(FileTypeMap fileMap)
Sets the default FileTypeMap for the system.
fileMap
- the new default FileTypeMap