Search in sources :

Example 1 with JpegProcessingException

use of com.drew.imaging.jpeg.JpegProcessingException in project tika by apache.

the class ImageMetadataExtractor method parseJpeg.

public void parseJpeg(File file) throws IOException, SAXException, TikaException {
    try {
        com.drew.metadata.Metadata jpegMetadata = JpegMetadataReader.readMetadata(file);
        handle(jpegMetadata);
    } catch (JpegProcessingException e) {
        throw new TikaException("Can't read JPEG metadata", e);
    } catch (MetadataException e) {
        throw new TikaException("Can't read JPEG metadata", e);
    }
}
Also used : TikaException(org.apache.tika.exception.TikaException) JpegProcessingException(com.drew.imaging.jpeg.JpegProcessingException) MetadataException(com.drew.metadata.MetadataException)

Aggregations

JpegProcessingException (com.drew.imaging.jpeg.JpegProcessingException)1 MetadataException (com.drew.metadata.MetadataException)1 TikaException (org.apache.tika.exception.TikaException)1