public class MimeUtils extends Object
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 and Description |
|---|
MimeUtils() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static void main(String[] args)
args - nothing.public static String getFileExtension(String mimeType)
mimeType - The mimetype whose extension will be returned.Copyright © 2014. All Rights Reserved.