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, INTERPRETED_ATTR, ISREGEX_ATTR, LOCAL_NAME_ATTR, MAGIC_PRIORITY_ATTR, MAGIC_TAG, MATCH_MASK_ATTR, MATCH_MINSHOULDMATCH_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) |
protected String |
getCustomContentType(String extension) |
String |
getExtensionContentType(String extension) |
Set<String> |
getExtensions(String contentType) |
boolean |
isWebImage(String mimeType) |
protected void |
read(InputStream inputStream,
Map<String,Set<String>> extensionsMap) |
protected void |
readMimeType(org.w3c.dom.Element element,
Map<String,Set<String>> extensionsMap) |
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 String getCustomContentType(String extension)
protected void read(InputStream inputStream,
Map<String,Set<String>> extensionsMap)
throws Exception
Exceptionprotected void readMimeType(org.w3c.dom.Element element,
Map<String,Set<String>> extensionsMap)