use of com.drew.metadata.exif.ExifReader in project tika by apache.
the class ImageMetadataExtractor method parseRawExif.
public void parseRawExif(byte[] exifData) throws IOException, SAXException, TikaException {
com.drew.metadata.Metadata metadata = new com.drew.metadata.Metadata();
ExifReader reader = new ExifReader();
reader.extract(new ByteArrayReader(exifData), metadata, ExifReader.JPEG_SEGMENT_PREAMBLE.length());
try {
handle(metadata);
} catch (MetadataException e) {
throw new TikaException("Can't process the EXIF Data", e);
}
}
Aggregations