javax.activation
public abstract class FileTypeMap extends Object
Constructor and Description |
---|
FileTypeMap() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getContentType(File file)
Returns the content type of the specified file.
|
abstract String |
getContentType(String filename)
Returns the content type of the specified file path.
|
static FileTypeMap |
getDefaultFileTypeMap()
Returns the system default file type map.
|
static void |
setDefaultFileTypeMap(FileTypeMap map)
Sets the default file type map.
|
public FileTypeMap()
public static FileTypeMap getDefaultFileTypeMap()
public static void setDefaultFileTypeMap(FileTypeMap map)
map
- the new file type mappublic abstract String getContentType(File file)
file
- the file to classifypublic abstract String getContentType(String filename)
filename
- the path of the file to classify