|
Préférences
Moteurs de recherche
|
||||||||||||||||
JavaTM Platform, Enterprise Edition, v 5.0
javax.activation
|
Constructor Summary | |
---|---|
FileTypeMap()
The default constructor. |
Method Summary | |
---|---|
abstract String |
getContentType(File file)
Return the type of the file object. |
abstract String |
getContentType(String filename)
Return the type of the file passed in. |
static FileTypeMap |
getDefaultFileTypeMap()
Return the default FileTypeMap for the system. |
static void |
setDefaultFileTypeMap(FileTypeMap map)
Sets the default FileTypeMap for the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTypeMap()
Method Detail |
---|
public abstract String getContentType(File file)
file
- A file to be typed.
public abstract String getContentType(String filename)
filename
- the pathname of the file.
public static void setDefaultFileTypeMap(FileTypeMap map)
map
- The FileTypeMap.
SecurityException
- if the caller doesn't have permission
to change the defaultpublic static FileTypeMap getDefaultFileTypeMap()
MimetypesFileTypeMap
.
setDefaultFileTypeMap(javax.activation.FileTypeMap)