public class MimeType extends Object
| Constructor and Description |
|---|
MimeType() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(String extension,
String contentType)
Associates the specified extension and content type
|
static boolean |
contains(String extension) |
static String |
get(String extension) |
static String |
get(String extension,
String defaultCt) |
public static String get(String extension)
extension - the extensionextension. If
no association is found, this method will return text/plainpublic static String get(String extension, String defaultCt)
extension - the extensiondefaultCt - the content type to return if there is no known
association for the specified extensionextension
or if no associate is found, returns defaultCtpublic static boolean contains(String extension)
extension - the extensiontrue if the specified extension has been registered
otherwise, returns falseCopyright © 2015. All Rights Reserved.