public class MimeTypeUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_MIME_TYPE
Default Mime Type
|
| Constructor and Description |
|---|
MimeTypeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getMimeType(byte[] bytes,
String filename)
Gets the MIME type for the specified byte array and filename
|
static String |
getMimeType(File file)
Gets the MIME type for the specified file
|
static String |
getMimeType(InputStream in)
Gets the MIME type for the specified input stream
|
static String |
getMimeType(String filename)
Gets the MIME type for the specified file name
|
public static final String DEFAULT_MIME_TYPE
public static String getMimeType(String filename)
filename - a file namepublic static String getMimeType(File file)
file - a filepublic static String getMimeType(InputStream in)
in - an input streamCopyright © 2009-2013. All Rights Reserved.