public class TiffModule
extends ModuleBase
| Modifier and Type | Field and Description |
|---|---|
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 Logger |
_logger
Logger for this class.
|
protected List<TiffProfile> |
_profile
List of profile checkers.
|
protected RandomAccessFile |
_raf
Open TIFF file.
|
protected int |
_version
TIFF version.
|
static String[] |
defaultConfigParams
Value to write as module params to the default config file.
|
| Constructor and Description |
|---|
TiffModule()
Instantiate a
TiffModule object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildProfileList()
Build list of profiles to check.
|
protected void |
checkValidity(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.
|
List<IFD> |
exifParse(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(RandomAccessFile raf,
RepInfo info)
Parse the TIFF for well-formedness and validity, accumulating
representation information.
|
protected IFD |
parseIFDChain(long next,
RepInfo info,
int type,
List<IFD> list,
boolean suppressErrors) |
protected List<IFD> |
parseIFDs(long offset,
RepInfo info)
Parse all IFDs in the file, accumulating representation information.
|
protected List<IFD> |
parseIFDs(long offset,
RepInfo info,
boolean suppressErrors,
int ifdType)
Parse all IFDs in the file, accumulating representation information.
|
protected void |
reportInvalid(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
|
public static final String[] defaultConfigParams
protected Logger _logger
protected List<TiffProfile> _profile
protected boolean _exifFirstFlag
protected boolean _exifThumbnailFlag
protected boolean _dngThumbnailFlag
protected boolean _dngRawFlag
protected RandomAccessFile _raf
protected int _version
protected boolean _byteOffsetIsValid
public final void parse(RandomAccessFile raf, RepInfo info) throws IOException
raf - Open TIFF fileinfo - Representation informatinoIOExceptionpublic void setByteOffsetValid(boolean v)
public final List<IFD> exifParse(RandomAccessFile raf, RepInfo info) throws IOException
raf - Open TIFF fileinfo - Representation informatinoIOExceptionprotected void buildProfileList()
protected void checkValidity(List<IFD> ifds, RepInfo info)
protected void checkValidity(TiffIFD ifd, RepInfo info) throws TiffException
ifd - IFDTiffExceptionprotected void reportInvalid(String s, RepInfo info)
protected List<IFD> parseIFDs(long offset, RepInfo info) throws TiffException
offset - Starting byte offsetinfo - Representation informationTiffExceptionprotected 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 errorsTiffExceptionprotected IFD parseIFDChain(long next, RepInfo info, int type, List<IFD> list, boolean suppressErrors) throws TiffException
TiffExceptionprotected void initParse()
protected int selectMimeTypeIndex()
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.