public class MimeType
extends java.lang.Object
| Constructor and Description |
|---|
MimeType() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(java.lang.String extension,
java.lang.String contentType)
Associates the specified extension and content type
|
static boolean |
contains(java.lang.String extension) |
static java.lang.String |
get(java.lang.String extension) |
static java.lang.String |
get(java.lang.String extension,
java.lang.String defaultCt) |
public static java.lang.String get(java.lang.String extension)
extension - the extensionextension. If
no association is found, this method will return text/plainpublic static java.lang.String get(java.lang.String extension,
java.lang.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(java.lang.String extension)
extension - the extensiontrue if the specified extension has been registered
otherwise, returns falsepublic static void add(java.lang.String extension,
java.lang.String contentType)
Associates the specified extension and content type
extension - the extensioncontentType - the content type associated with the extensionCopyright © 2018. All Rights Reserved.