public class JpegModule extends ModuleBase
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List |
_appSegsList |
protected java.util.List |
_arithCondTables |
protected int |
_capability0 |
protected int |
_capability1 |
protected Checksummer |
_ckSummer |
protected java.util.List |
_commentsList |
protected java.util.Set |
_compressSet |
protected ChecksumInputStream |
_cstream |
protected java.io.DataInputStream |
_dstream |
protected boolean |
_exifProfileOK |
protected Property |
_exifProp |
protected java.util.List |
_expList |
protected java.util.List |
_imageList |
protected Property |
_imageProp |
protected java.util.List |
_jpegExtsList |
protected Property |
_metadata |
protected NisoImageMetadata |
_niso |
protected int |
_numScans |
protected int |
_numSegments |
protected java.util.List |
_primaryImageList |
protected java.util.List |
_propList |
protected java.util.List |
_quantTables |
protected boolean |
_reportedJFIF |
protected boolean |
_reportedSigMatch |
protected int |
_restartInterval |
protected boolean |
_seenExif |
protected boolean |
_seenJFIF |
protected boolean |
_seenJPEGL |
protected boolean |
_seenSOF |
protected boolean |
_seenSPIFF |
protected SpiffDir |
_spiffDir |
protected java.util.List |
_srsList |
protected Tiling |
_tiling |
protected int |
_units |
protected int |
_xDensity |
protected Property |
_xmpProp |
protected int |
_yDensity |
protected java.lang.String |
exifProfileName |
protected java.lang.String |
jfifProfileName
PRIVATE INSTANCE FIELDS.
|
protected java.lang.String |
jpeglProfileName |
protected java.text.NumberFormat |
minorFmt |
protected static int[] |
sigByte |
protected java.lang.String |
spiffProfileName |
_app, _bigEndian, _checksumFinished, _countStream, _coverage, _crc32, _date, _defaultParams, _features, _format, _init, _isRandomAccess, _je, _logger, _md5, _mimeType, _name, _nByte, _note, _param, _release, _repInfoNote, _rights, _sha1, _signature, _specification, _validityNote, _vendor, _verbosity, _wellFormedNoteMAXIMUM_VERBOSITY, MINIMUM_VERBOSITY| Constructor and Description |
|---|
JpegModule()
Instantiate a JpegModule object.
|
| Modifier and Type | Method and Description |
|---|---|
protected Property |
buildCapProp(RepInfo info) |
protected Property |
buildExpandProp(RepInfo info) |
protected Property |
buildTilingProp(RepInfo info) |
void |
checkSignatures(java.io.File file,
java.io.InputStream stream,
RepInfo info)
Check if the digital object conforms to this Module's
internal signature information.
|
protected static boolean |
equalArray(int[] a,
int[] b) |
protected void |
extractExifNisoData(NisoImageMetadata exifData) |
protected void |
initNiso()
Initializes the constant portions of the niso metadata.
|
protected void |
initParse()
Initializes the state of the module for parsing.
|
int |
parse(java.io.InputStream stream,
RepInfo info,
int parseIndex)
Parse the content of a purported JPEG stream digital object and store the
results in RepInfo.
|
protected void |
readAPP0(RepInfo info) |
protected void |
readAPP1(RepInfo info) |
protected void |
readAPP8(RepInfo info) |
protected void |
readComment(RepInfo info) |
protected void |
readDAC(RepInfo info) |
protected void |
readDHP(RepInfo info) |
protected void |
readDQT(RepInfo info) |
protected void |
readDRI(RepInfo info) |
protected void |
readDTI(RepInfo info) |
protected void |
readDTT(RepInfo info) |
protected void |
readEXP(RepInfo info) |
protected boolean |
readHeader(RepInfo info) |
protected void |
readJPEGExtension(int dbyt,
RepInfo info) |
protected void |
readSOF(int dbyt,
RepInfo info) |
protected void |
readSRS(RepInfo info) |
long |
readUnsignedInt(java.io.DataInputStream stream)
One-argument version of
readUnsignedInt. |
int |
readUnsignedShort(java.io.DataInputStream stream)
One-argument version of
readUnsignedShort. |
protected void |
readVer(RepInfo info) |
protected Property |
readXMP(byte[] buf) |
protected void |
reportAppExt(int dbyt,
RepInfo info) |
protected boolean |
skipSegment(RepInfo info) |
addIntegerProperty, addIntegerProperty, applyDefaultParams, calcRAChecksum, checkSignatures, getApp, getBase, getBufferedDataStream, getCoverage, getCRC32, getDate, getDefaultParams, getFeatures, getFormat, getMimeType, getName, getNByte, getNote, getRelease, getRepInfoNote, getRights, getSignature, getSpecification, getValidityNote, getVendor, getWellFormedNote, hasFeature, init, initFeatures, isBigEndian, isRandomAccess, param, parse, readByteBuf, readDouble, readDouble, readDouble, readFloat, readFloat, readSignedByte, readSignedByte, readSignedByte, readSignedInt, readSignedInt, readSignedInt, readSignedLong, readSignedRational, readSignedRational, readSignedShort, readSignedShort, readSignedShort, readUnsignedByte, readUnsignedByte, readUnsignedByte, readUnsignedInt, readUnsignedInt, readUnsignedInt, readUnsignedRational, readUnsignedRational, readUnsignedRational, readUnsignedShort, readUnsignedShort, readUnsignedShort, resetParams, setApp, setBase, setChecksums, setCRC32, setDefaultParams, setMD5, setNByte, setSHA1, setValidityNote, setVerbosity, show, skipBytes, skipBytes, vectorToPropArrayprotected java.lang.String jfifProfileName
protected java.lang.String spiffProfileName
protected java.lang.String exifProfileName
protected java.lang.String jpeglProfileName
protected java.text.NumberFormat minorFmt
protected Checksummer _ckSummer
protected ChecksumInputStream _cstream
protected java.io.DataInputStream _dstream
protected Property _metadata
protected Property _imageProp
protected Property _exifProp
protected Property _xmpProp
protected NisoImageMetadata _niso
protected java.util.List _propList
protected java.util.List _imageList
protected Tiling _tiling
protected java.util.List _quantTables
protected java.util.List _arithCondTables
protected java.util.List _srsList
protected java.util.List _primaryImageList
protected int _numSegments
protected int _numScans
protected int _restartInterval
protected boolean _seenJFIF
protected boolean _seenSPIFF
protected boolean _seenJPEGL
protected boolean _reportedSigMatch
protected SpiffDir _spiffDir
protected boolean _seenExif
protected boolean _exifProfileOK
protected boolean _reportedJFIF
protected boolean _seenSOF
protected java.util.List _commentsList
protected java.util.List _jpegExtsList
protected java.util.List _appSegsList
protected java.util.List _expList
protected java.util.Set _compressSet
protected int _capability0
protected int _capability1
protected static final int[] sigByte
protected int _units
protected int _xDensity
protected int _yDensity
public void checkSignatures(java.io.File file,
java.io.InputStream stream,
RepInfo info)
throws java.io.IOException
checkSignatures in interface ModulecheckSignatures in class ModuleBasefile - A RandomAccessFile, positioned at its beginning,
which is generated from the object to be parsedstream - An InputStream, positioned at its beginning,
which is generated from the object to be parsedinfo - A fresh RepInfo object which will be modified
to reflect the results of the testjava.io.IOExceptionpublic int parse(java.io.InputStream stream,
RepInfo info,
int parseIndex)
throws java.io.IOException
parse in interface Moduleparse in class ModuleBasestream - An InputStream, positioned at its beginning,
which is generated from the object to be parsedinfo - A fresh RepInfo object which will be modified
to reflect the results of the parsingparseIndex - Must be 0 in first call to parse. If
parse returns a nonzero value, it must be
called again with parseIndex
equal to that return value.java.io.IOExceptionpublic int readUnsignedShort(java.io.DataInputStream stream)
throws java.io.IOException
readUnsignedShort.
JPEG is always big-endian, so readUnsignedShort can
unambiguously drop its endian argument.java.io.IOExceptionpublic long readUnsignedInt(java.io.DataInputStream stream)
throws java.io.IOException
readUnsignedInt.
JPEG is always big-endian, so readUnsignedInt can
unambiguously drop its endian argument.java.io.IOExceptionprotected void initParse()
initParse in class ModuleBaseprotected void initNiso()
protected boolean readHeader(RepInfo info)
protected void readAPP0(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readAPP1(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readAPP8(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readVer(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readDTI(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readDTT(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readSRS(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void reportAppExt(int dbyt,
RepInfo info)
protected void readSOF(int dbyt,
RepInfo info)
throws java.io.IOException
java.io.IOExceptionprotected void readDHP(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readEXP(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readDRI(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readDQT(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readDAC(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected void readJPEGExtension(int dbyt,
RepInfo info)
throws java.io.IOException
java.io.IOExceptionprotected void readComment(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected Property readXMP(byte[] buf)
protected void extractExifNisoData(NisoImageMetadata exifData)
protected boolean skipSegment(RepInfo info) throws java.io.IOException
java.io.IOExceptionprotected static boolean equalArray(int[] a,
int[] b)