|
Project Wonder 5.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objecter.attachment.utils.ERMimeTypeManager
public class ERMimeTypeManager
ERMimeTypeManager provides an interface to looking up mime type metadata.
| Properties | |
er.attachment.mimeTypes | er.attachment.mimeTypes |
er.attachment.additionalMimeTypes | er.attachment.additionalMimeTypes |
er.attachment.mimeType.[mimeType].name | er.attachment.mimeType.[mimeType].name |
er.attachment.mimeType.[mimeType].uti | er.attachment.mimeType.[mimeType].uti |
er.attachment.mimeType.[mimeType].extensions | er.attachment.mimeType.[mimeType].extensions |
| Method Summary | |
|---|---|
void |
addMimeType(ERMimeType mimeType)
Adds a mime type definition to the manager. |
void |
clearMimeTypes()
Removes all the mime types from this manager. |
java.lang.String |
extensionForFileName(java.lang.String fileName)
Returns the extension for the given filename. |
ERMimeType |
mimeTypeForExtension(java.lang.String extension,
boolean exceptionIfNotFound)
Returns the ERMimeType for the given file extension, optionally throwing an exception if the type isn't found. |
ERMimeType |
mimeTypeForFile(java.io.File file,
boolean exceptionIfNotFound)
Returns the ERMimeType for the given file, optionally throwing an exception if the type isn't found. |
ERMimeType |
mimeTypeForFileName(java.lang.String fileName,
boolean exceptionIfNotFound)
Returns the ERMimeType for the given file name, optionally throwing an exception if the type isn't found. |
ERMimeType |
mimeTypeForMimeTypeString(java.lang.String mimeType,
boolean exceptionIfNotFound)
Returns the ERMimeType for the given mime type string, optionally throwing an exception if the type isn't found. |
ERMimeType |
mimeTypeForUTI(java.lang.String uti,
boolean exceptionIfNotFound)
Returns the ERMimeType for the given UTI, optionally throwing an exception if the type isn't found. |
static ERMimeTypeManager |
mimeTypeManager()
Returns the singleton mime type manager. |
static java.lang.String |
primaryExtension(java.lang.String mimeTypeStr)
Returns the primary extension for the given mime type. |
void |
removeMimeType(ERMimeType mimeType)
Removes the given mime type definition from this manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ERMimeTypeManager mimeTypeManager()
public static java.lang.String primaryExtension(java.lang.String mimeTypeStr)
mimeTypeStr - the mime type string to lookup
public void clearMimeTypes()
public void removeMimeType(ERMimeType mimeType)
mimeType - the mime type to removepublic void addMimeType(ERMimeType mimeType)
mimeType - the mime type to addpublic java.lang.String extensionForFileName(java.lang.String fileName)
fileName - the filename
public ERMimeType mimeTypeForFileName(java.lang.String fileName,
boolean exceptionIfNotFound)
fileName - the file name to lookupexceptionIfNotFound - if true, a NoSuchElementException exception is thrown if the mime type isn't found
public ERMimeType mimeTypeForFile(java.io.File file,
boolean exceptionIfNotFound)
file - the file to lookupexceptionIfNotFound - if true, a NoSuchElementException exception is thrown if the mime type isn't found
public ERMimeType mimeTypeForMimeTypeString(java.lang.String mimeType,
boolean exceptionIfNotFound)
mimeType - the mime type string to lookupexceptionIfNotFound - if true, a NoSuchElementException exception is thrown if the mime type isn't found
public ERMimeType mimeTypeForExtension(java.lang.String extension,
boolean exceptionIfNotFound)
extension - the file extension to lookupexceptionIfNotFound - if true, a NoSuchElementException exception is thrown if the mime type isn't found
public ERMimeType mimeTypeForUTI(java.lang.String uti,
boolean exceptionIfNotFound)
uti - the UTI to lookupexceptionIfNotFound - if true, a NoSuchElementException exception is thrown if the mime type isn't found
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||