public class ImageMetadataExtractor extends Object
Constructor and Description |
---|
ImageMetadataExtractor(Metadata metadata) |
ImageMetadataExtractor(Metadata metadata,
org.apache.tika.parser.image.ImageMetadataExtractor.DirectoryHandler... handlers) |
Modifier and Type | Method and Description |
---|---|
protected void |
handle(Iterator<com.drew.metadata.Directory> directories)
Copies extracted tags to tika metadata using registered handlers.
|
protected void |
handle(com.drew.metadata.Metadata metadataExtractor)
Copies extracted tags to tika metadata using registered handlers.
|
void |
parseJpeg(File file) |
void |
parseRawExif(byte[] exifData) |
void |
parseRawExif(InputStream stream,
int length,
boolean needsExifHeader) |
void |
parseRawXMP(byte[] xmpData) |
void |
parseTiff(File file) |
public ImageMetadataExtractor(Metadata metadata)
metadata
- to extract to, using default directory handlerspublic ImageMetadataExtractor(Metadata metadata, org.apache.tika.parser.image.ImageMetadataExtractor.DirectoryHandler... handlers)
metadata
- to extract tohandlers
- handlers in order, note that handlers may override values from earlier handlerspublic void parseJpeg(File file) throws IOException, SAXException, TikaException
IOException
SAXException
TikaException
public void parseTiff(File file) throws IOException, SAXException, TikaException
IOException
SAXException
TikaException
public void parseRawExif(InputStream stream, int length, boolean needsExifHeader) throws IOException, SAXException, TikaException
IOException
SAXException
TikaException
public void parseRawExif(byte[] exifData) throws IOException, SAXException, TikaException
IOException
SAXException
TikaException
public void parseRawXMP(byte[] xmpData) throws IOException, SAXException, TikaException
IOException
SAXException
TikaException
protected void handle(com.drew.metadata.Metadata metadataExtractor) throws com.drew.metadata.MetadataException
metadataExtractor
- Tag directories from a Metadata Extractor "reader"com.drew.metadata.MetadataException
- This method does not handle exceptions from Metadata Extractorprotected void handle(Iterator<com.drew.metadata.Directory> directories) throws com.drew.metadata.MetadataException
directories
- Metadata Extractor Directory
instances.com.drew.metadata.MetadataException
- This method does not handle exceptions from Metadata ExtractorCopyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.