public class WarcModule extends 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
MAXIMUM_VERBOSITY, MINIMUM_VERBOSITY
Constructor and Description |
---|
WarcModule()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
parse(InputStream stream,
RepInfo info,
int parseIndex)
Parse the content of a stream digital object and store the
results in RepInfo.
|
void |
parse(RandomAccessFile file,
RepInfo info)
Parse the content of a random access digital object and store the
results in RepInfo.
|
protected void |
parseRecords(org.jwat.warc.WarcReader reader)
Parse WARC records.
|
protected void |
processRecord(org.jwat.warc.WarcRecord record)
Process a WARC record.
|
void |
resetParams()
Reset parameter settings.
|
protected void |
setReaderOptions(org.jwat.warc.WarcReader reader)
Set digest options for WARC reader.
|
addIntegerProperty, addIntegerProperty, applyDefaultParams, calcRAChecksum, checkSignatures, 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, 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, setApp, setBase, setChecksums, setCRC32, setDefaultParams, setMD5, setNByte, setSHA1, setValidityNote, setVerbosity, show, skipBytes, skipBytes, vectorToPropArray
public void resetParams() throws Exception
resetParams
in interface Module
resetParams
in class ModuleBase
Exception
public void parse(RandomAccessFile file, RepInfo info) throws IOException
ModuleBase
parse
in interface Module
parse
in class ModuleBase
file
- A RandomAccessFile, 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 parsingIOException
public int parse(InputStream stream, RepInfo info, int parseIndex) throws IOException
ModuleBase
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.IOException
protected void setReaderOptions(org.jwat.warc.WarcReader reader) throws JhoveException
reader
- WARC reader instanceJhoveException
protected void parseRecords(org.jwat.warc.WarcReader reader) throws IOException, JhoveException
reader
- WARC reader used to parse recordsEOFException
- if EOF occurs prematurelyIOException
- if an IO error occurs while processingJhoveException
- if a serious problem needs to be reportedprotected void processRecord(org.jwat.warc.WarcRecord record) throws IOException, JhoveException
record
- WARC record from WARC readerEOFException
- if EOF occurs prematurelyIOException
- if an IO error occurs while processingJhoveException
- if a serious problem needs to be reportedCopyright © 2008–2017 The Open Preservation Foundation. All rights reserved.