
Public Member Functions | |
| void | addMimeType (ERMimeType mimeType) |
| void | clearMimeTypes () |
| String | extensionForFileName (String fileName) |
| ERMimeType | mimeTypeForExtension (String extension, boolean exceptionIfNotFound) |
| ERMimeType | mimeTypeForFile (File file, boolean exceptionIfNotFound) |
| ERMimeType | mimeTypeForFileName (String fileName, boolean exceptionIfNotFound) |
| ERMimeType | mimeTypeForMimeTypeString (String mimeType, boolean exceptionIfNotFound) |
| ERMimeType | mimeTypeForUTI (String uti, boolean exceptionIfNotFound) |
| void | removeMimeType (ERMimeType mimeType) |
Static Public Member Functions | |
| static synchronized ERMimeTypeManager | mimeTypeManager () |
| static String | primaryExtension (String mimeTypeStr) |
Private Member Functions | |
| ERMimeTypeManager () | |
Private Attributes | |
| List< ERMimeType > | _mimeTypes |
Static Private Attributes | |
| static ERMimeTypeManager | INSTANCE |
| ERMimeTypeManager | ( | ) | [private] |
| void addMimeType | ( | ERMimeType | mimeType | ) |
Adds a mime type definition to the manager.
| mimeType | the mime type to add |
| void clearMimeTypes | ( | ) |
Removes all the mime types from this manager.
Returns the extension for the given filename.
| fileName | the filename |
| ERMimeType mimeTypeForExtension | ( | String | extension, | |
| boolean | exceptionIfNotFound | |||
| ) |
Returns the ERMimeType for the given file extension, optionally throwing an exception if the type isn't found.
| extension | the file extension to lookup | |
| exceptionIfNotFound | if true, a NoSuchElementException exception is thrown if the mime type isn't found |
| ERMimeType mimeTypeForFile | ( | File | file, | |
| boolean | exceptionIfNotFound | |||
| ) |
Returns the ERMimeType for the given file, optionally throwing an exception if the type isn't found.
| file | the file to lookup | |
| exceptionIfNotFound | if true, a NoSuchElementException exception is thrown if the mime type isn't found |
| ERMimeType mimeTypeForFileName | ( | String | fileName, | |
| boolean | exceptionIfNotFound | |||
| ) |
Returns the ERMimeType for the given file name, optionally throwing an exception if the type isn't found.
| fileName | the file name to lookup | |
| exceptionIfNotFound | if true, a NoSuchElementException exception is thrown if the mime type isn't found |
| ERMimeType mimeTypeForMimeTypeString | ( | String | mimeType, | |
| boolean | exceptionIfNotFound | |||
| ) |
Returns the ERMimeType for the given mime type string, optionally throwing an exception if the type isn't found.
| mimeType | the mime type string to lookup | |
| exceptionIfNotFound | if true, a NoSuchElementException exception is thrown if the mime type isn't found |
| ERMimeType mimeTypeForUTI | ( | String | uti, | |
| boolean | exceptionIfNotFound | |||
| ) |
Returns the ERMimeType for the given UTI, optionally throwing an exception if the type isn't found.
| uti | the UTI to lookup | |
| exceptionIfNotFound | if true, a NoSuchElementException exception is thrown if the mime type isn't found |
| static synchronized ERMimeTypeManager mimeTypeManager | ( | ) | [static] |
Returns the singleton mime type manager. See the top level documentation on information about configuring custom mime types.
Returns the primary extension for the given mime type.
| mimeTypeStr | the mime type string to lookup |
| void removeMimeType | ( | ERMimeType | mimeType | ) |
Removes the given mime type definition from this manager.
| mimeType | the mime type to remove |
List<ERMimeType> _mimeTypes [private] |
ERMimeTypeManager INSTANCE [static, private] |
1.5.8