Package lumis.portal.file
Interface IContentTypeProvider
-
@StableMinor(version="14.0", sinceVersion="8.2") public interface IContentTypeProvider
Provider responsible for defining the content type of a given file. Usually, this is called when a file is beingadded
.- Since:
- 8.2.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getContentType(String fileName, InputStream fileInputStream)
Returns the content type for the given file.
If no content type could be inferred,null
should be returned.
-
-
-
Method Detail
-
getContentType
String getContentType(String fileName, InputStream fileInputStream) throws PortalException, IOException
Returns the content type for the given file.
If no content type could be inferred,null
should be returned. In this case, the portal will calculate the content type by using its default implementation.- Parameters:
fileName
- the file name of the given file.fileInputStream
- the file input stream of the given file. The stream will be closed by who called this method.- Returns:
- the content type for the given file or
null
if no content type could be inferred. - Throws:
PortalException
IOException
- Since:
- 8.2.0
-
-