|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.twelvemonkeys.net.MIMEUtil
public final class MIMEUtil
Contains mappings from file extension to mime-types and from mime-type to file-types.
| Method Summary | |
|---|---|
static String |
bareMIME(String pMIME)
Removes any charset or extra info from the mime-type string (anything after a semicolon, ;, inclusive). |
static String |
getExtension(String pMIME)
Returns the default file extension for the given MIME type. |
static Map<String,List<String>> |
getExtensionMappings()
Returns an unmodifiabale Map view of the MIME to
extension mapping, to use as the default mapping in client applications. |
static List<String> |
getExtensions(String pMIME)
Returns all file extension for the given MIME type. |
static String |
getMIMEType(String pFileExt)
Returns the default MIME type for the given file extension. |
static Map<String,List<String>> |
getMIMETypeMappings()
Returns an unmodifiabale Map view of the extension to
MIME mapping, to use as the default mapping in client applications. |
static List<String> |
getMIMETypes(String pFileExt)
Returns all MIME types for the given file extension. |
static void |
main(String[] pArgs)
For debugging. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getMIMEType(String pFileExt)
pFileExt - the file extension
String containing the MIME type, or null if
there are no known MIME types for the given file extension.public static List<String> getMIMETypes(String pFileExt)
pFileExt - the file extension
List of Strings containing the MIME types, or an empty
list, if there are no known MIME types for the given file extension.public static Map<String,List<String>> getMIMETypeMappings()
Map view of the extension to
MIME mapping, to use as the default mapping in client applications.
Map view of the extension to
MIME mapping.public static String getExtension(String pMIME)
null.
pMIME - the MIME type
String containing the file extension, or null
if there are no known file extensions for the given MIME type.public static List<String> getExtensions(String pMIME)
pMIME - the MIME type
List of Strings containing the MIME types, or an empty
list, if there are no known file extensions for the given MIME type.public static Map<String,List<String>> getExtensionMappings()
Map view of the MIME to
extension mapping, to use as the default mapping in client applications.
Map view of the MIME to
extension mapping.public static String bareMIME(String pMIME)
;, inclusive).
pMIME - the mime-type string
public static void main(String[] pArgs)
pArgs - command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||