com.drew.metadata.exif
Class ExifReader

java.lang.Object
  extended by com.drew.metadata.exif.ExifReader
All Implemented Interfaces:
MetadataReader

public class ExifReader
extends java.lang.Object
implements MetadataReader

Extracts Exif data from a JPEG header segment, providing information about the camera/scanner/capture device (if available). Information is encapsulated in an Metadata object.

Author:
Drew Noakes http://drewnoakes.com

Field Summary
static int TAG_EXIF_OFFSET
           
static int TAG_GPS_INFO_OFFSET
           
static int TAG_INTEROP_OFFSET
           
static int TAG_MAKER_NOTE
           
static int TIFF_HEADER_START_OFFSET
           
 
Constructor Summary
ExifReader(byte[] data)
          Creates an ExifReader for the given JPEG header segment.
ExifReader(java.io.File file)
          Creates an ExifReader for a Jpeg file.
ExifReader(java.io.InputStream is)
          Creates an ExifReader for a Jpeg stream.
ExifReader(JpegSegmentData segmentData)
          Creates an ExifReader for a JpegSegmentData object.
 
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
 

Field Detail

TAG_EXIF_OFFSET

public static final int TAG_EXIF_OFFSET
See Also:
Constant Field Values

TAG_INTEROP_OFFSET

public static final int TAG_INTEROP_OFFSET
See Also:
Constant Field Values

TAG_GPS_INFO_OFFSET

public static final int TAG_GPS_INFO_OFFSET
See Also:
Constant Field Values

TAG_MAKER_NOTE

public static final int TAG_MAKER_NOTE
See Also:
Constant Field Values

TIFF_HEADER_START_OFFSET

public static final int TIFF_HEADER_START_OFFSET
See Also:
Constant Field Values
Constructor Detail

ExifReader

public ExifReader(JpegSegmentData segmentData)
Creates an ExifReader for a JpegSegmentData object.

Parameters:
segmentData -

ExifReader

public ExifReader(java.io.File file)
           throws JpegProcessingException
Creates an ExifReader for a Jpeg file.

Parameters:
file -
Throws:
JpegProcessingException

ExifReader

public ExifReader(java.io.InputStream is)
           throws JpegProcessingException
Creates an ExifReader for a Jpeg stream.

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

ExifReader

public ExifReader(byte[] data)
Creates an ExifReader for the given JPEG header segment.

Method Detail

extract

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

Specified by:
extract in interface MetadataReader

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


Copyright © 2006 Drew Noakes. All Rights Reserved.