public class MimeTypesImpl extends Object implements com.liferay.portal.kernel.util.MimeTypes, org.apache.tika.mime.MimeTypesReaderMetKeys
ACRONYM_TAG, ALIAS_TAG, ALIAS_TYPE_ATTR, COMMENT_TAG, GLOB_TAG, ISREGEX_ATTR, LOCAL_NAME_ATTR, MAGIC_PRIORITY_ATTR, MAGIC_TAG, MATCH_MASK_ATTR, MATCH_OFFSET_ATTR, MATCH_TAG, MATCH_TYPE_ATTR, MATCH_VALUE_ATTR, MIME_INFO_TAG, MIME_TYPE_TAG, MIME_TYPE_TYPE_ATTR, NS_URI_ATTR, PATTERN_ATTR, ROOT_XML_TAG, SUB_CLASS_OF_TAG, SUB_CLASS_TYPE_ATTR, TIKA_LINK_TAG, TIKA_UTI_TAG| Constructor and Description |
|---|
MimeTypesImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
String |
getContentType(File file) |
String |
getContentType(File file,
String fileName) |
String |
getContentType(InputStream inputStream,
String fileName) |
String |
getContentType(String fileName) |
String |
getExtensionContentType(String extension) |
Set<String> |
getExtensions(String contentType) |
boolean |
isWebImage(String mimeType) |
protected void |
read(InputStream stream) |
protected void |
readMimeType(Element element) |
public void afterPropertiesSet()
public String getContentType(File file)
getContentType in interface com.liferay.portal.kernel.util.MimeTypespublic String getContentType(File file, String fileName)
getContentType in interface com.liferay.portal.kernel.util.MimeTypespublic String getContentType(InputStream inputStream, String fileName)
getContentType in interface com.liferay.portal.kernel.util.MimeTypespublic String getContentType(String fileName)
getContentType in interface com.liferay.portal.kernel.util.MimeTypespublic String getExtensionContentType(String extension)
getExtensionContentType in interface com.liferay.portal.kernel.util.MimeTypespublic Set<String> getExtensions(String contentType)
getExtensions in interface com.liferay.portal.kernel.util.MimeTypespublic boolean isWebImage(String mimeType)
isWebImage in interface com.liferay.portal.kernel.util.MimeTypesprotected void read(InputStream stream) throws Exception
Exceptionprotected void readMimeType(Element element)