|
|||||||||
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.AsciiModule
public class AsciiModule
Module for analysis of content as an ASCII 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
|
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 | |
---|---|
AsciiModule()
Creates an AsciiModule. |
Method Summary | |
---|---|
protected void |
checkLineEnd(int ch)
PRIVATE INSTANCE METHODS. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ChecksumInputStream _cstream
protected java.io.DataInputStream _dstream
protected boolean _lineEndCR
protected boolean _lineEndLF
protected boolean _lineEndCRLF
protected int _prevChar
protected java.util.Map<java.lang.Integer,java.lang.String> _controlCharMap
protected boolean _withTextMD
protected TextMDMetadata _textMD
Constructor Detail |
---|
public AsciiModule()
Method Detail |
---|
public final int parse(java.io.InputStream stream, RepInfo info, int parseIndex) throws java.io.IOException
parse
in interface Module
parse
in class ModuleBase
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.
java.io.IOException
public void checkSignatures(java.io.File file, java.io.InputStream stream, RepInfo info) throws java.io.IOException
checkSignatures
in interface Module
checkSignatures
in class ModuleBase
file
- A File object for the object being 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 test
java.io.IOException
protected void checkLineEnd(int ch)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |