|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.ModuleBase
edu.harvard.hul.ois.jhove.module.TiffModule
public class TiffModule
Module for identification and validation of TIFF files.
Field Summary | |
---|---|
protected boolean |
_byteOffsetIsValid
|
protected boolean |
_dngRawFlag
Special flag for DNG profiles; is raw IFD profile satisfied |
protected boolean |
_dngThumbnailFlag
Special flag for DNG profiles; is "thumbnail" (IFD 0) profile satisfied |
protected boolean |
_exifFirstFlag
Special flag for Exif profiles: Is main IFD profile satisfied |
protected boolean |
_exifThumbnailFlag
Special flag for Exif profiles: Is thumbnail IFD profile satisfied |
protected java.util.List<TiffProfile> |
_profile
List of profile checkers. |
protected java.io.RandomAccessFile |
_raf
Open TIFF file. |
protected int |
_version
TIFF version. |
static java.lang.String[] |
defaultConfigParams
Value to write as module params to the default config file. |
Fields inherited from class edu.harvard.hul.ois.jhove.ModuleBase |
---|
_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, _wellFormedNote |
Fields inherited from interface edu.harvard.hul.ois.jhove.Module |
---|
MAXIMUM_VERBOSITY, MINIMUM_VERBOSITY |
Constructor Summary | |
---|---|
TiffModule()
Instantiate a |
Method Summary | |
---|---|
protected void |
buildProfileList()
Build list of profiles to check. |
protected void |
checkValidity(java.util.List<IFD> ifds,
RepInfo info)
Go through all the IFD's, calling checkIFDValidity on each one that is a standard IFD. |
protected void |
checkValidity(TiffIFD ifd,
RepInfo info)
Check the validity of the IFD. |
java.util.List<IFD> |
exifParse(java.io.RandomAccessFile raf,
RepInfo info)
Special-purpose, limited parser for embedded Exif files. |
protected void |
initParse()
Initializes the state of the module for parsing. |
void |
parse(java.io.RandomAccessFile raf,
RepInfo info)
Parse the TIFF for well-formedness and validity, accumulating representation information. |
protected IFD |
parseIFDChain(long next,
RepInfo info,
int type,
java.util.List<IFD> list,
boolean suppressErrors)
|
protected java.util.List<IFD> |
parseIFDs(long offset,
RepInfo info)
Parse all IFDs in the file, accumulating representation information. |
protected java.util.List<IFD> |
parseIFDs(long offset,
RepInfo info,
boolean suppressErrors,
int ifdType)
Parse all IFDs in the file, accumulating representation information. |
protected void |
reportInvalid(java.lang.String s,
RepInfo info)
Report an instance of invalidity. |
protected int |
selectMimeTypeIndex()
Return the index into _mimeType which should be used for the MIME type property. |
void |
setByteOffsetValid(boolean v)
Allow odd offsets in values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] defaultConfigParams
protected java.util.List<TiffProfile> _profile
protected boolean _exifFirstFlag
protected boolean _exifThumbnailFlag
protected boolean _dngThumbnailFlag
protected boolean _dngRawFlag
protected java.io.RandomAccessFile _raf
protected int _version
protected boolean _byteOffsetIsValid
Constructor Detail |
---|
public TiffModule()
Method Detail |
---|
public final void parse(java.io.RandomAccessFile raf, RepInfo info) throws java.io.IOException
parse
in interface Module
parse
in class ModuleBase
raf
- Open TIFF fileinfo
- Representation informatino
java.io.IOException
public void setByteOffsetValid(boolean v)
public final java.util.List<IFD> exifParse(java.io.RandomAccessFile raf, RepInfo info) throws java.io.IOException
raf
- Open TIFF fileinfo
- Representation informatino
java.io.IOException
protected void buildProfileList()
protected void checkValidity(java.util.List<IFD> ifds, RepInfo info)
protected void checkValidity(TiffIFD ifd, RepInfo info) throws TiffException
ifd
- IFD
TiffException
protected void reportInvalid(java.lang.String s, RepInfo info)
protected java.util.List<IFD> parseIFDs(long offset, RepInfo info) throws TiffException
offset
- Starting byte offsetinfo
- Representation information
TiffException
protected java.util.List<IFD> parseIFDs(long offset, RepInfo info, boolean suppressErrors, int ifdType) throws TiffException
offset
- Starting byte offsetinfo
- Representation informationsuppressErrors
- If true, use IFD even if it has errors
TiffException
protected IFD parseIFDChain(long next, RepInfo info, int type, java.util.List<IFD> list, boolean suppressErrors) throws TiffException
TiffException
protected void initParse()
initParse
in class ModuleBase
protected int selectMimeTypeIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |