public final class MimeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
guessExtensionFromMimeType(String mimeType)
Returns the registered extension for the given MIME type.
|
static String |
guessMimeTypeFromExtension(String extension)
Returns the MIME type for the given extension.
|
static boolean |
hasExtension(String extension)
Returns true if the given extension has a registered MIME type.
|
static boolean |
hasMimeType(String mimeType)
Returns true if the given MIME type has an entry in the map.
|
public static boolean hasMimeType(String mimeType)
mimeType - A MIME type (i.e. text/plain)public static String guessMimeTypeFromExtension(String extension)
extension - A file extension without the leading '.'public static boolean hasExtension(String extension)
extension - A file extension without the leading '.'public static String guessExtensionFromMimeType(String mimeType)
mimeType - A MIME type (i.e. text/plain)Copyright © 2017. All rights reserved.