com.drew.metadata.exif

Class ExifReader

public class ExifReader extends 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 intTAG_EXIF_OFFSET
static intTAG_GPS_INFO_OFFSET
static intTAG_INTEROP_OFFSET
static intTAG_MAKER_NOTE
static intTIFF_HEADER_START_OFFSET
Constructor Summary
ExifReader(JpegSegmentData segmentData)
Creates an ExifReader for a JpegSegmentData object.
ExifReader(File file)
Creates an ExifReader for a Jpeg file.
ExifReader(InputStream is)
Creates an ExifReader for a Jpeg stream.
ExifReader(byte[] data)
Creates an ExifReader for the given JPEG header segment.
Method Summary
Metadataextract()
Performs the Exif data extraction, returning a new instance of Metadata.
Metadataextract(Metadata metadata)
Performs the Exif data extraction, adding found values to the specified instance of Metadata.

Field Detail

TAG_EXIF_OFFSET

public static final int TAG_EXIF_OFFSET

TAG_GPS_INFO_OFFSET

public static final int TAG_GPS_INFO_OFFSET

TAG_INTEROP_OFFSET

public static final int TAG_INTEROP_OFFSET

TAG_MAKER_NOTE

public static final int TAG_MAKER_NOTE

TIFF_HEADER_START_OFFSET

public static final int TIFF_HEADER_START_OFFSET

Constructor Detail

ExifReader

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

Parameters: segmentData

ExifReader

public ExifReader(File file)
Creates an ExifReader for a Jpeg file.

Parameters: file

Throws: JpegProcessingException

ExifReader

public ExifReader(InputStream is)
Creates an ExifReader for a Jpeg stream.

Parameters: is JPEG stream. Stream will be closed.

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.

extract

public Metadata extract(Metadata metadata)
Performs the Exif data extraction, adding found values to the specified instance of Metadata.
Copyright © 2006 Drew Noakes. All Rights Reserved.