Package com.idrsolutions.image.tika
Class ImageDetector
java.lang.Object
com.idrsolutions.image.tika.ImageDetector
- All Implemented Interfaces:
Serializable
,org.apache.tika.detect.Detector
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tika.mime.MediaType
detect
(InputStream inputStream, org.apache.tika.metadata.Metadata metadata) Attempt to identify the file-type of a given image file.
-
Constructor Details
-
ImageDetector
public ImageDetector()
-
-
Method Details
-
detect
public org.apache.tika.mime.MediaType detect(InputStream inputStream, org.apache.tika.metadata.Metadata metadata) throws IOException Attempt to identify the file-type of a given image file.- Specified by:
detect
in interfaceorg.apache.tika.detect.Detector
- Parameters:
inputStream
- Input stream.metadata
- Metadata. Unused.- Returns:
- A MediaType object describing its best guess as to the type of the file.
- Throws:
IOException
- Thrown if the image file cannot be opened.
-