|
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.ERMimeType
public class ERMimeType
ERMimeType stores the metadata about a particular mime type.
Constructor Summary | |
---|---|
ERMimeType(java.lang.String name,
java.lang.String mimeType,
java.lang.String uti,
com.webobjects.foundation.NSArray<java.lang.String> extensions)
Constructs an ERMimeType. |
Method Summary | |
---|---|
com.webobjects.foundation.NSArray<java.lang.String> |
extensions()
Returns the list of extensions that map to this mime type. |
ERGlobMimeType |
globMimeType()
Returns the glob type of this mime type (image/pdf=>image/*). |
boolean |
isAudio()
Returns true for audio/ |
boolean |
isImage()
Returns true for image/ |
boolean |
isRepresentedByExtension(java.lang.String extension)
Returns true if this mime type represents a file of the given extension. |
boolean |
isVideo()
Returns true for video/ |
boolean |
matches(ERMimeType otherMimeType)
Supports glob mime types for comparison, so image/* matches image/jpeg. |
boolean |
matchesExactly(ERMimeType mimeType)
Returns true if this mime type exactly matches the other, meaning, the underlying mime type strings are identical. |
java.lang.String |
mimeType()
Returns the mime type string representation. |
java.lang.String |
name()
Returns the name of this mime type. |
java.lang.String |
primaryExtension()
Returns the "primary" extension for this mime type. |
java.lang.String |
subtype()
Returns the part of the mime type after the "/". |
java.lang.String |
toString()
|
java.lang.String |
type()
Returns the part of the mime type before the "/". |
java.lang.String |
uti()
Returns the universal type identifier. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ERMimeType(java.lang.String name, java.lang.String mimeType, java.lang.String uti, com.webobjects.foundation.NSArray<java.lang.String> extensions)
name
- the display name of the mime type ("Portable Network Graphics")mimeType
- the mime type string ("image/jpg")uti
- the universal type identifier that corresponds to this mime type ("public.jpeg")extensions
- the array of file extensions for this mime type ("jpg", "jpeg", etc)Method Detail |
---|
public ERGlobMimeType globMimeType()
public boolean matchesExactly(ERMimeType mimeType)
mimeType
- the other mime type to compare
public boolean matches(ERMimeType otherMimeType)
otherMimeType
- the other mime type to compare against
public java.lang.String name()
public java.lang.String mimeType()
public java.lang.String uti()
public com.webobjects.foundation.NSArray<java.lang.String> extensions()
public boolean isRepresentedByExtension(java.lang.String extension)
extension
- the extension to lookup
public java.lang.String primaryExtension()
public java.lang.String type()
public java.lang.String subtype()
public boolean isImage()
public boolean isVideo()
public boolean isAudio()
public java.lang.String toString()
toString
in class java.lang.Object
|
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 |