public class EpubModule extends ModuleBase
| Modifier and Type | Field and Description |
|---|---|
protected Property |
_metadata |
protected List<Property> |
_propList |
static String[] |
NOTWELLFORMED_ERRCODES |
_app, _bigEndian, _checksumFinished, _ckSummer, _countStream, _coverage, _crc32, _cstream, _date, _defaultParams, _dstream, _features, _format, _init, _isRandomAccess, _je, _logger, _md5, _mimeType, _name, _nByte, _note, _param, _release, _repInfoNote, _rights, _sha1, _sha256, _signature, _specification, _validityNote, _vendor, _verbosity, _wellFormedNoteMAXIMUM_VERBOSITY, MINIMUM_VERBOSITY| Constructor and Description |
|---|
EpubModule()
Instantiate a EpubModule object using default properties
|
EpubModule(String name,
String release,
int[] date,
String[] format,
String coverage,
String[] mimetype,
String wellformedNote,
String validityNote,
String repinfoNote,
String note,
String rights,
boolean isRandomAccess,
Agent moduleAgent)
Instantiate a EpubModule object using constructor arguments
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkSignatures(File file,
InputStream stream,
RepInfo info) |
protected void |
initializeInstance(Agent moduleAgent)
|
protected void |
initParse() |
int |
parse(InputStream stream,
RepInfo info,
int parseIndex)
Parse the content of a purported EPUB file and store the results in RepInfo.
|
void |
parse(RandomAccessFile file,
RepInfo info) |
protected void |
setupDataStream(InputStream stream,
RepInfo info) |
static String |
toUtf8(String inputString)
Make sure the string contains valid UTF-8 characters
|
addIntegerProperty, addIntegerProperty, applyDefaultParams, calcRAChecksum, checkSignatures, checksumIfRafNotCopied, getApp, getBase, getBufferedDataStream, getCoverage, getCRC32, getDate, getDefaultParams, getFeatures, getFormat, getMimeType, getName, getNByte, getNote, getRelease, getRepInfoNote, getRights, getSignature, getSpecification, getValidityNote, getVendor, getWellFormedNote, hasFeature, init, initFeatures, initInfo, isBigEndian, isParamInDefaults, 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, resetParams, setApp, setBase, setChecksums, setCRC32, setDefaultParams, setMD5, setNByte, setSHA1, setSHA256, setValidityNote, setVerbosity, show, skipBytes, skipBytes, skipDstreamToEnd, vectorToPropArraypublic static final String[] NOTWELLFORMED_ERRCODES
protected Property _metadata
public EpubModule()
public EpubModule(String name, String release, int[] date, String[] format, String coverage, String[] mimetype, String wellformedNote, String validityNote, String repinfoNote, String note, String rights, boolean isRandomAccess, Agent moduleAgent)
name - release - date - format - coverage - mimetype - wellformedNote - validityNote - repinfoNote - note - rights - isRandomAccess - moduleAgent - protected void initializeInstance(Agent moduleAgent)
agentName - agentType - agentAddress - agentTelephone - agentEmail - protected void setupDataStream(InputStream stream, RepInfo info)
setupDataStream in class ModuleBasepublic void checkSignatures(File file, InputStream stream, RepInfo info) throws IOException
checkSignatures in interface ModulecheckSignatures in class ModuleBaseIOExceptionpublic int parse(InputStream stream, RepInfo info, int parseIndex) throws IOException
parse in interface Moduleparse in class ModuleBasestream - 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.IOExceptionpublic void parse(RandomAccessFile file, RepInfo info) throws IOException
parse in interface Moduleparse in class ModuleBaseIOExceptionpublic static String toUtf8(String inputString)
inputString - protected void initParse()
initParse in class ModuleBaseCopyright © 2008–2021 The Open Preservation Foundation. All rights reserved.