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) |
protected String |
getCustomContentType(String extension) |
String |
getExtensionContentType(String extension) |
Set<String> |
getExtensions(String contentType) |
boolean |
isWebImage(String mimeType) |
protected void |
read(InputStream stream)
Deprecated.
As of Judson (7.1.x), replaced by
read(InputStream,
Map) |
protected void |
read(InputStream stream,
Map<String,Set<String>> extensionsMap) |
protected void |
readMimeType(org.w3c.dom.Element element)
Deprecated.
As of Judson (7.1.x), replaced by
readMimeType(Element, Map) |
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.MimeTypes
public String getContentType(File file, String fileName)
getContentType
in interface com.liferay.portal.kernel.util.MimeTypes
public String getContentType(InputStream inputStream, String fileName)
getContentType
in interface com.liferay.portal.kernel.util.MimeTypes
public String getContentType(String fileName)
getContentType
in interface com.liferay.portal.kernel.util.MimeTypes
public String getExtensionContentType(String extension)
getExtensionContentType
in interface com.liferay.portal.kernel.util.MimeTypes
public Set<String> getExtensions(String contentType)
getExtensions
in interface com.liferay.portal.kernel.util.MimeTypes
public boolean isWebImage(String mimeType)
isWebImage
in interface com.liferay.portal.kernel.util.MimeTypes
protected String getCustomContentType(String extension)
@Deprecated protected void read(InputStream stream) throws Exception
read(InputStream,
Map)
Exception
protected void read(InputStream stream, Map<String,Set<String>> extensionsMap) throws Exception
Exception
@Deprecated protected void readMimeType(org.w3c.dom.Element element)
readMimeType(Element, Map)
protected void readMimeType(org.w3c.dom.Element element, Map<String,Set<String>> extensionsMap)