Package com.drew.metadata.jfif
Class JfifReader
- java.lang.Object
-
- com.drew.metadata.jfif.JfifReader
-
- All Implemented Interfaces:
JpegSegmentMetadataReader
,MetadataReader
public class JfifReader extends java.lang.Object implements JpegSegmentMetadataReader, MetadataReader
Reader for JFIF data, found in the APP0 JPEG segment.- http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format
- http://www.w3.org/Graphics/JPEG/jfif3.pdf
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREAMBLE
-
Constructor Summary
Constructors Constructor Description JfifReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extract(RandomAccessReader reader, Metadata metadata)
Performs the Jfif data extraction, adding found values to the specified instance ofMetadata
.java.lang.Iterable<JpegSegmentType>
getSegmentTypes()
Gets the set of JPEG segment types that this reader is interested in.void
readJpegSegments(java.lang.Iterable<byte[]> segments, Metadata metadata, JpegSegmentType segmentType)
Extracts metadata from all instances of a particular JPEG segment type.
-
-
-
Field Detail
-
PREAMBLE
public static final java.lang.String PREAMBLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSegmentTypes
public java.lang.Iterable<JpegSegmentType> getSegmentTypes()
Description copied from interface:JpegSegmentMetadataReader
Gets the set of JPEG segment types that this reader is interested in.- Specified by:
getSegmentTypes
in interfaceJpegSegmentMetadataReader
-
readJpegSegments
public void readJpegSegments(java.lang.Iterable<byte[]> segments, Metadata metadata, JpegSegmentType segmentType)
Description copied from interface:JpegSegmentMetadataReader
Extracts metadata from all instances of a particular JPEG segment type.- Specified by:
readJpegSegments
in interfaceJpegSegmentMetadataReader
- Parameters:
segments
- A sequence of byte arrays from which the metadata should be extracted. These are in the order encountered in the original file.metadata
- TheMetadata
object into which extracted values should be merged.segmentType
- TheJpegSegmentType
being read.
-
extract
public void extract(RandomAccessReader reader, Metadata metadata)
Performs the Jfif data extraction, adding found values to the specified instance ofMetadata
.- Specified by:
extract
in interfaceMetadataReader
- Parameters:
reader
- TheRandomAccessReader
from which the metadata should be extracted.metadata
- TheMetadata
object into which extracted values should be merged.
-
-