Metadata Extractor Logo

com.drew.metadata.iptc
Class IptcReader

java.lang.Object
  extended by com.drew.metadata.iptc.IptcReader
All Implemented Interfaces:
MetadataReader

public class IptcReader
extends java.lang.Object
implements MetadataReader

Decodes IPTC binary data, populating a Metadata object with tag values in an IptcDirectory.

Author:
Drew Noakes http://drewnoakes.com

Constructor Summary
IptcReader(byte[] data)
          Creates an IptcReader for the given IPTC data segment.
IptcReader(java.io.File jpegFile)
          Deprecated. Not all files will be Jpegs! Use a constructor that provides the IPTC segment in isolation.
IptcReader(java.io.InputStream jpegInputStream)
          Deprecated. Not all files will be Jpegs! Use a constructor that provides the IPTC segment in isolation.
 
Method Summary
 Metadata extract()
          Performs the Exif data extraction, returning a new instance of Metadata.
 Metadata extract(Metadata metadata)
          Performs the Exif data extraction, adding found values to the specified instance of Metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IptcReader

public IptcReader(java.io.File jpegFile)
           throws JpegProcessingException
Deprecated. Not all files will be Jpegs! Use a constructor that provides the IPTC segment in isolation.

Creates a new IptcReader for the specified Jpeg jpegFile.

Throws:
JpegProcessingException

IptcReader

public IptcReader(java.io.InputStream jpegInputStream)
           throws JpegProcessingException
Deprecated. Not all files will be Jpegs! Use a constructor that provides the IPTC segment in isolation.

Creates an IptcReader for a JPEG stream.

Parameters:
jpegInputStream - JPEG stream. Stream will be closed.
Throws:
JpegProcessingException

IptcReader

public IptcReader(byte[] data)
Creates an IptcReader for the given IPTC data segment.

Method Detail

extract

public Metadata extract()
Performs the Exif data extraction, returning a new instance of Metadata.

Specified by:
extract in interface MetadataReader
Returns:
The populated Metadata object.

extract

public Metadata extract(Metadata metadata)
Performs the Exif data extraction, adding found values to the specified instance of Metadata.

Specified by:
extract in interface MetadataReader
Returns:
The updated Metadata object.

Metadata Extractor Logo

Copyright © 2006 Drew Noakes. All Rights Reserved.