public interface IFileTypeDetector
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType(java.io.InputStream fileIn)
Get content type for the input stream.
|
boolean |
isCSS(java.lang.String contentType)
Returns true if file with the passed content type is a css file
|
boolean |
isHtml(java.lang.String contentType)
Returns true if file with the passed content type is a html file
|
boolean |
isImage(java.lang.String contentType)
Returns true if file with the passed content type is a image file
|
boolean |
isZip(java.lang.String contentType)
Returns true if file with the passed content type is a zip file
|
java.lang.String getContentType(java.io.InputStream fileIn) throws java.io.IOException
fileIn
- file to uploadjava.io.IOException
boolean isCSS(java.lang.String contentType)
contentType
- Content type returned by getContentType(fileIn)boolean isImage(java.lang.String contentType)
contentType
- Content type returned by getContentType(fileIn)boolean isHtml(java.lang.String contentType)
contentType
- Content type returned by getContentType(fileIn)boolean isZip(java.lang.String contentType)
contentType
- Content type returned by getContentType(fileIn)Built on October 18 2017