
Public Member Functions | |
| ERMimeType (String name, String mimeType, String uti, NSArray< String > extensions) | |
| NSArray< String > | extensions () |
| ERGlobMimeType | globMimeType () |
| boolean | isAudio () |
| boolean | isImage () |
| boolean | isRepresentedByExtension (String extension) |
| boolean | isVideo () |
| boolean | matches (ERMimeType otherMimeType) |
| boolean | matchesExactly (ERMimeType mimeType) |
| String | mimeType () |
| String | name () |
| String | primaryExtension () |
| String | subtype () |
| String | toString () |
| String | type () |
| String | uti () |
Private Attributes | |
| NSArray< String > | _extensions |
| String | _mimeType |
| String | _name |
| String | _uti |
| ERMimeType | ( | String | name, | |
| String | mimeType, | |||
| String | uti, | |||
| NSArray< String > | extensions | |||
| ) |
Constructs an ERMimeType.
| 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) |
| NSArray<String> extensions | ( | ) |
Returns the list of extensions that map to this mime type.
Reimplemented in ERGlobMimeType.
| ERGlobMimeType globMimeType | ( | ) |
Returns the glob type of this mime type (image/pdf=>image/*).
| boolean isAudio | ( | ) |
Returns true for audio/<whatever> mime types.
| boolean isImage | ( | ) |
Returns true for image/<whatever> mime types.
| boolean isRepresentedByExtension | ( | String | extension | ) |
Returns true if this mime type represents a file of the given extension.
| extension | the extension to lookup |
| boolean isVideo | ( | ) |
Returns true for video/<whatever> mime types.
| boolean matches | ( | ERMimeType | otherMimeType | ) |
Supports glob mime types for comparison, so image/* matches image/jpeg.
| otherMimeType | the other mime type to compare against |
| boolean matchesExactly | ( | ERMimeType | mimeType | ) |
Returns true if this mime type exactly matches the other, meaning, the underlying mime type strings are identical.
| mimeType | the other mime type to compare |
| String mimeType | ( | ) |
Returns the mime type string representation.
| String name | ( | ) |
Returns the name of this mime type.
| String primaryExtension | ( | ) |
Returns the "primary" extension for this mime type. The primary extension is the first extension in the list, and generally should be considered the most common extension to use for the type.
| String subtype | ( | ) |
Returns the part of the mime type after the "/".
| String toString | ( | ) |
| String type | ( | ) |
Returns the part of the mime type before the "/".
| String uti | ( | ) |
Returns the universal type identifier.
Reimplemented in ERGlobMimeType.
NSArray<String> _extensions [private] |
1.5.8