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 Utf8Module

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

All Implemented Interfaces:
  Module

    public class Utf8Module

extends ModuleBase

Module for analysis of content as a UTF-8 stream.

Field Summary
`protected java.util.Map<java.lang.Integer,java.lang.String>` | `_controlCharMap`
`protected ChecksumInputStream` | `_cstream` PRIVATE INSTANCE FIELDS.
`protected java.io.DataInputStream` | `_dstream`
`protected boolean` | `_lineEndCR`
`protected boolean` | `_lineEndCRLF`
`protected boolean` | `_lineEndLF`
`protected int` | `_prevChar`
`protected TextMDMetadata` | `_textMD`
`protected boolean` | `_withTextMD`
`protected Utf8BlockMarker` | `blockMarker`
`protected int[]` | `initialBytes`

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
`Utf8Module()` Creates a Utf8Module.

Method Summary
`protected void` | `checkLineEnd(int ch)` Accumulate information about line endings.
`protected boolean` | `checkMark(int byt, 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.
`int` | `parse(java.io.InputStream stream, RepInfo info, int parseIndex)` Parse the content of a stream digital object and store the results in RepInfo.

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, initParse, 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

### _cstream

    protected ChecksumInputStream _cstream

  PRIVATE INSTANCE FIELDS.

### _dstream

    protected java.io.DataInputStream _dstream

### _lineEndCR

    protected boolean _lineEndCR

### _lineEndLF

    protected boolean _lineEndLF

### _lineEndCRLF

    protected boolean _lineEndCRLF

### _prevChar

    protected int _prevChar

### _controlCharMap

    protected java.util.Map<java.lang.Integer,java.lang.String> _controlCharMap

### initialBytes

    protected int[] initialBytes

### blockMarker

    protected Utf8BlockMarker blockMarker

### _withTextMD

    protected boolean _withTextMD

### _textMD

    protected TextMDMetadata _textMD

Constructor Detail

### Utf8Module

    public Utf8Module()

  Creates a Utf8Module.

Method Detail

### parse

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

  Parse the content of a 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. If multiple calls to `parse` are made on the basis of a nonzero value being returned, a new InputStream must be provided each time.
    `info` - A fresh (on the first call) RepInfo object which will be modified to reflect the results of the parsing If multiple calls to `parse` are made on the basis of a nonzero value being returned, the same RepInfo object should be passed with each call.
    `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`

### 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. Try to read the BOM if it's present, and check the beginning of the file.

  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`

### checkLineEnd

    protected void checkLineEnd(int ch)

  Accumulate information about line endings.

  Parameters:
    `ch` - Current character

### checkMark

    protected boolean checkMark(int byt,
                                RepInfo info)

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