GifModule (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module
Class GifModule

    java.lang.Object
      edu.harvard.hul.ois.jhove.ModuleBase
          edu.harvard.hul.ois.jhove.module.GifModule

All Implemented Interfaces:
  Module

    public class GifModule

extends ModuleBase

Module for identification and validation of GIF files.

Author:
  Gary McGath

Field Summary
`protected java.util.List` | `_blocksList`
`protected Checksummer` | `_ckSummer`
`protected ChecksumInputStream` | `_cstream`
`protected java.io.DataInputStream` | `_dstream`
`protected int` | `_gceCounter`
`protected boolean` | `_globalColorTableFlag`
`protected int` | `_globalColorTableSize`
`protected Property` | `_metadata`
`protected int` | `_numGraphicBlocks`
`protected byte[]` | `_sig` PRIVATE INSTANCE FIELDS.
`protected Property` | `_xmpProp`

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
`GifModule()` Instantiate a `GifModule` object.

Method Summary
`protected Property` | `addByteProperty(java.lang.String name, int value, java.lang.String[] labels)`
`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 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 GIF stream digital object and store the results in RepInfo.
`protected boolean` | `readAppExtension(RepInfo info)`
`protected boolean` | `readBlock(RepInfo info)`
`protected boolean` | `readCommentExtension(RepInfo info)`
`protected boolean` | `readExtBlock(RepInfo info)`
`protected boolean` | `readGraphicsCtlBlock(RepInfo info)`
`protected boolean` | `readImage(RepInfo info)`
`protected boolean` | `readLSD(RepInfo info)`
`protected boolean` | `readPlainTextExtension(RepInfo info)`
`protected boolean` | `readSig(RepInfo info)`
`protected int` | `readUnsignedShort(java.io.DataInputStream stream)`
`protected int` | `readXMP()`

Methods inherited from class edu.harvard.hul.ois.jhove.ModuleBase
`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, vectorToPropArray`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _sig

    protected byte[] _sig

  PRIVATE INSTANCE FIELDS.

### _ckSummer

    protected Checksummer _ckSummer

### _xmpProp

    protected Property _xmpProp

### _cstream

    protected ChecksumInputStream _cstream

### _dstream

    protected java.io.DataInputStream _dstream

### _globalColorTableFlag

    protected boolean _globalColorTableFlag

### _globalColorTableSize

    protected int _globalColorTableSize

### _gceCounter

    protected int _gceCounter

### _metadata

    protected Property _metadata

### _blocksList

    protected java.util.List _blocksList

### _numGraphicBlocks

    protected int _numGraphicBlocks

Constructor Detail

### GifModule

    public GifModule()

  Instantiate a `GifModule` object.

Method Detail

### checkSignatures

    public void checkSignatures(java.io.File file,
                                java.io.InputStream stream,
                                RepInfo info)
                         throws java.io.IOException

  Check if the digital object conforms to this Module's internal signature information.

  Specified by:
    `checkSignatures` in interface `Module`
  Overrides:
    `checkSignatures` in class `ModuleBase`
  Parameters:
    `file` - A File object for the object being parsed
    `stream` - An InputStream, positioned at its beginning, which is generated from the object to be parsed
    `info` - A fresh RepInfo object which will be modified to reflect the results of the test
  Throws:
    `java.io.IOException`

### parse

    public int parse(java.io.InputStream stream,
                     RepInfo info,
                     int parseIndex)
              throws java.io.IOException

  Parse the content of a purported GIF stream digital object and store the results in RepInfo.

  Specified by:
    `parse` in interface `Module`
  Overrides:
    `parse` in class `ModuleBase`
  Parameters:
    `stream` - An InputStream, positioned at its beginning, which is generated from the object to be parsed
    `info` - A fresh RepInfo object which will be modified to reflect the results of the parsing
    `parseIndex` - 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.
  Throws:
    `java.io.IOException`

### initParse

    protected void initParse()

  Initializes the state of the module for parsing.

  Overrides:
    `initParse` in class `ModuleBase`

### readSig

    protected boolean readSig(RepInfo info)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### readLSD

    protected boolean readLSD(RepInfo info)
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### readBlock

    protected boolean readBlock(RepInfo info)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### readExtBlock

    protected boolean readExtBlock(RepInfo info)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### readImage

    protected boolean readImage(RepInfo info)
                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### readAppExtension

    protected boolean readAppExtension(RepInfo info)
                                throws java.io.IOException

  Throws:
    `java.io.IOException`

### readCommentExtension

    protected boolean readCommentExtension(RepInfo info)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### readPlainTextExtension

    protected boolean readPlainTextExtension(RepInfo info)
                                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### readGraphicsCtlBlock

    protected boolean readGraphicsCtlBlock(RepInfo info)
                                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### readXMP

    protected int readXMP()
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### addByteProperty

    protected Property addByteProperty(java.lang.String name,
                                       int value,
                                       java.lang.String[] labels)

### readUnsignedShort

    protected int readUnsignedShort(java.io.DataInputStream stream)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD