Liferay 6.1.2-ce-ga3

com.liferay.portal.util
Class MimeTypesImpl

java.lang.Object
  extended by com.liferay.portal.util.MimeTypesImpl
All Implemented Interfaces:
MimeTypes, org.apache.tika.mime.MimeTypesReaderMetKeys

public class MimeTypesImpl
extends Object
implements MimeTypes, org.apache.tika.mime.MimeTypesReaderMetKeys


Field Summary
 
Fields inherited from interface org.apache.tika.mime.MimeTypesReaderMetKeys
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
 
Constructor Summary
MimeTypesImpl()
           
 
Method Summary
 String getContentType(File file)
           
 String getContentType(File file, String fileName)
           
 String getContentType(InputStream inputStream, String fileName)
           
 String getContentType(String fileName)
           
 Set<String> getExtensions(String contentType)
           
protected  void read(InputStream stream)
           
protected  void readMimeType(Element element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTypesImpl

public MimeTypesImpl()
Method Detail

getContentType

public String getContentType(File file)
Specified by:
getContentType in interface MimeTypes

getContentType

public String getContentType(File file,
                             String fileName)
Specified by:
getContentType in interface MimeTypes

getContentType

public String getContentType(InputStream inputStream,
                             String fileName)
Specified by:
getContentType in interface MimeTypes

getContentType

public String getContentType(String fileName)
Specified by:
getContentType in interface MimeTypes

getExtensions

public Set<String> getExtensions(String contentType)
Specified by:
getExtensions in interface MimeTypes

read

protected void read(InputStream stream)
             throws Exception
Throws:
Exception

readMimeType

protected void readMimeType(Element element)

Liferay 6.1.2-ce-ga3