public class MimeTypeHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getMimeType(byte[] fileData)
Returns the MimeType for the file given as a byte array.
|
static String |
getMimeType(File file)
Returns the MimeType for the given file.
|
static String |
getMimeType(InputStream fileStream,
String filename)
Returns the MimeType for the given file.
|
static String |
getMimeType(String absolutePathToFile)
Returns the MimeType for the given file.
|
public static String getMimeType(byte[] fileData)
fileData - The file as byte arraypublic static String getMimeType(File file)
file - The file to check.public static String getMimeType(InputStream fileStream, String filename)
fileStream - The file as streamfilename - the local filename the stream was loaded from, can be nullCopyright © 2019 Communote team. All rights reserved.