|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.datatransformation.datatransformationlibrary.utils.MimeUtils
public class MimeUtils
Helper class for mapping file extensions to mimetypes and mimetypes to file extensions.
The file which contains the mappings should be set in the utils.mime_mappings_file property.
| Constructor Summary | |
|---|---|
MimeUtils()
|
|
| Method Summary | |
|---|---|
static String |
getFileExtension(String mimeType)
Returns the file extension of a mimetype. |
static String |
getMimeType(String extension)
Returns a mimetype of a file extension. |
static void |
main(String[] args)
Simple test. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MimeUtils()
| Method Detail |
|---|
public static void main(String[] args)
args - nothing.public static String getFileExtension(String mimeType)
mimeType - The mimetype whose extension will be returned.
public static String getMimeType(String extension)
extension - The file extension whose mimetype will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||