com.liferay.portal.util
Class MimeTypesImpl

java.lang.Object
  extended by com.liferay.portal.util.MimeTypesImpl
All Implemented Interfaces:
com.liferay.portal.kernel.util.MimeTypes

public class MimeTypesImpl
extends java.lang.Object
implements com.liferay.portal.kernel.util.MimeTypes

View Source

Additional MIME types should be added to META-INF/mime.types or magic.mime.

Author:
Jorge Ferrer, Brian Wing Shun Chan, Alexander Chow

Constructor Summary
MimeTypesImpl()
           
 
Method Summary
 java.lang.String getContentType(java.io.File file)
           
 java.lang.String getContentType(java.io.InputStream inputStream, java.lang.String fileName)
           
 java.lang.String getContentType(java.lang.String fileName)
           
 
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 java.lang.String getContentType(java.io.File file)
Specified by:
getContentType in interface com.liferay.portal.kernel.util.MimeTypes

getContentType

public java.lang.String getContentType(java.io.InputStream inputStream,
                                       java.lang.String fileName)
Specified by:
getContentType in interface com.liferay.portal.kernel.util.MimeTypes

getContentType

public java.lang.String getContentType(java.lang.String fileName)
Specified by:
getContentType in interface com.liferay.portal.kernel.util.MimeTypes