Class ImageDetector

java.lang.Object
com.idrsolutions.image.tika.ImageDetector
All Implemented Interfaces:
Serializable, org.apache.tika.detect.Detector

public class ImageDetector extends Object implements org.apache.tika.detect.Detector
See Also:
  • 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 interface org.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.