|
Préférences
Moteurs de recherche
|
||||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.6.0
javax.activation
|
|||||||||||||||||||
| Constructor Summary | |
|---|---|
MimetypesFileTypeMap()
The default constructor. |
|
MimetypesFileTypeMap(InputStream is)
Construct a MimetypesFileTypeMap with programmatic entries added from the InputStream. |
|
MimetypesFileTypeMap(String mimeTypeFileName)
Construct a MimetypesFileTypeMap with programmatic entries added from the named file. |
|
| Method Summary | |
|---|---|
void |
addMimeTypes(String mime_types)
Prepend the MIME type values to the registry. |
String |
getContentType(File f)
Return the MIME type of the file object. |
String |
getContentType(String filename)
Return the MIME type based on the specified file name. |
| Methods inherited from class javax.activation.FileTypeMap |
|---|
getDefaultFileTypeMap, setDefaultFileTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimetypesFileTypeMap()
public MimetypesFileTypeMap(String mimeTypeFileName) throws IOException
mimeTypeFileName - the file name
IOExceptionpublic MimetypesFileTypeMap(InputStream is)
is - the input stream to read from| Method Detail |
|---|
public void addMimeTypes(String mime_types)
mime_types - A .mime.types formatted string of entries.public String getContentType(File f)
getContentType(f.getName()).
getContentType in class FileTypeMapf - the file
public String getContentType(String filename)
getContentType in class FileTypeMapfilename - the file name