javax.activation
public class MimetypesFileTypeMap extends FileTypeMap
| Constructor Summary | |
|---|---|
| MimetypesFileTypeMap()
Default constructor. | |
| MimetypesFileTypeMap(String mimeTypeFileName)
Constructor specifying a filename. | |
| MimetypesFileTypeMap(InputStream is)
Constructor specifying an input stream. | |
| Method Summary | |
|---|---|
| void | addMimeTypes(String mime_types)
Adds entries prorammatically to the registry. |
| String | getContentType(File f)
Returns the MIME content type of the file.
|
| String | getContentType(String filename)
Returns the MIME type based on the given filename.
|
Parameters: mimeTypeFileName the name of the file to read mime.types entries from
Parameters: is the input stream to read mime.types entries from
Parameters: mime_types a mime.types formatted entries string
getContentType(f.getName()).Parameters: f the file
Parameters: filename the filename