Package org.apache.any23.mime
Class NaiveMIMETypeDetector
- java.lang.Object
-
- org.apache.any23.mime.NaiveMIMETypeDetector
-
- All Implemented Interfaces:
MIMETypeDetector
public class NaiveMIMETypeDetector extends Object implements MIMETypeDetector
Basic implementation ofMIMETypeDetectorbased on file extensions.
-
-
Constructor Summary
Constructors Constructor Description NaiveMIMETypeDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MIMETypeguessMIMEType(String fileName, InputStream input, MIMEType mimeTypeFromMetadata)Estimates theMIMEtype of the content of input file.
-
-
-
Method Detail
-
guessMIMEType
public MIMEType guessMIMEType(String fileName, InputStream input, MIMEType mimeTypeFromMetadata)
Description copied from interface:MIMETypeDetectorEstimates theMIMEtype of the content of input file.- Specified by:
guessMIMETypein interfaceMIMETypeDetector- Parameters:
fileName- name of the file.input- content of the file.mimeTypeFromMetadata- mimetype declared in metadata.- Returns:
- the supposed mime type or
nullif nothing appropriate found.
-
-