public class MimeTypesImpl extends Object implements com.liferay.portal.kernel.util.MimeTypes
| Constructor and Description |
|---|
MimeTypesImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType(File file) |
String |
getContentType(File file,
String fileName) |
String |
getContentType(InputStream inputStream,
String fileName) |
String |
getContentType(String fileName) |
Map<String,LinkedHashSet<String>> |
getExtensionByMediaType() |
String |
getExtensionContentType(String extension) |
Set<String> |
getExtensions(String contentType) |
protected Optional<String> |
getFileContentType(File file)
Protected for unit test.
|
de.mklinger.qetcher.client.model.v1.FileExtensionInfos |
getFileExtensions() |
protected List<String> |
getFilenameExtensions(String filename)
Protected for unit test.
|
protected Optional<String> |
getInputStreamContentType(InputStream in)
Protected for unit test.
|
boolean |
isWebImage(String mimeType) |
protected void |
setLiferayMimeTypes(com.liferay.portal.kernel.util.MimeTypes liferayMimeTypes)
For unit tests.
|
protected void setLiferayMimeTypes(com.liferay.portal.kernel.util.MimeTypes liferayMimeTypes)
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 boolean isWebImage(String mimeType)
isWebImage in interface com.liferay.portal.kernel.util.MimeTypesprotected Optional<String> getFileContentType(File file)
protected Optional<String> getInputStreamContentType(InputStream in)
public String getExtensionContentType(String extension)
getExtensionContentType in interface com.liferay.portal.kernel.util.MimeTypesprotected List<String> getFilenameExtensions(String filename)
public Set<String> getExtensions(String contentType)
getExtensions in interface com.liferay.portal.kernel.util.MimeTypespublic de.mklinger.qetcher.client.model.v1.FileExtensionInfos getFileExtensions()
public Map<String,LinkedHashSet<String>> getExtensionByMediaType()
Copyright © 2013–2019 mklinger GmbH. All rights reserved.