public abstract class FileTypeMap extends Object
FileTypeMap,
FileDataSource,
MimetypesFileTypeMap
| Constructor and Description |
|---|
FileTypeMap()
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getContentType(File
Return the type of the file object.
|
abstract String |
getContentType(String
Return the type of the file passed in.
|
static FileTypeMap |
getDefaultFileTypeMap()
Return the default FileTypeMap for the system.
|
static void |
setDefaultFileTypeMap(FileTypeMap
Sets the default FileTypeMap for the system.
|
public abstract StringgetContentType(File file)
file - A file to be typed.
public abstract StringgetContentType(String filename)
filename - the pathname of the file.
public static void setDefaultFileTypeMap(FileTypeMapmap)
map - The FileTypeMap.
SecurityException - if the caller doesn't have permission to change the default
public static FileTypeMapgetDefaultFileTypeMap()
MimetypesFileTypeMap.
setDefaultFileTypeMap(javax.activation.FileTypeMap)