public class ArcVersionBlock extends ArcRecordBase
| Modifier and Type | Field and Description |
|---|---|
static int |
TOSTRING_BUFFER_SIZE
Buffer size used in toString().
|
bClosed, bHasPseudoEmptyPayload, bIsCompliant, bPayloadClosed, computedBlockDigest, computedPayloadDigest, consumed, diagnostics, excessiveMetadata, header, httpHeader, in, nlp, payload, reader, recordType, RT_ARC_RECORD, RT_VERSION_BLOCK, startOffset, trailingNewLines, version, versionHeader| Modifier | Constructor and Description |
|---|---|
protected |
ArcVersionBlock()
Protected constructor to force instantiation of version block
from stream.
|
| Modifier and Type | Method and Description |
|---|---|
static ArcVersionBlock |
createRecord(ArcWriter writer)
Create and initialize a new
ArcVersionBlock for writing. |
static ArcVersionBlock |
parseVersionBlock(ArcReader reader,
Diagnostics<Diagnosis> diagnostics,
ArcHeader header,
ArcFieldParsers fieldParsers,
ByteCountingPushBackInputStream in)
Creates a new
VersionBlock based on the supplied header and
the version block in the payload, if present. |
protected void |
processPayload(ByteCountingPushBackInputStream in,
ArcReader reader)
An ARC version block payload must include a version line and a
block description line and in v1.1 the rest of the payload consists
of XML formatted metadata related to the harvesters configuration.
|
java.lang.String |
toString() |
protected void |
validateContentType()
Validates the version block content type.
|
addErrorDiagnosis, close, getArchiveDate, getArchiveDateStr, getArchiveLength, getArchiveLengthStr, getChecksum, getConsumed, getContentType, getContentTypeStr, getFileName, getHttpHeader, getInetAddress, getIpAddress, getLocation, getOffset, getOffsetStr, getPayload, getPayloadContent, getResultCode, getResultCodeStr, getScheme, getStartOffset, getUrl, getUrlStr, getVersion, hasPayload, hasPseudoEmptyPayload, isClosed, isCompliant, isValidStreamOfCRLF, parseRecord, payloadClosedpublic static final int TOSTRING_BUFFER_SIZE
protected ArcVersionBlock()
public static ArcVersionBlock createRecord(ArcWriter writer)
ArcVersionBlock for writing.writer - writer which shall be usedArcVersionBlock prepared for writingpublic static ArcVersionBlock parseVersionBlock(ArcReader reader, Diagnostics<Diagnosis> diagnostics, ArcHeader header, ArcFieldParsers fieldParsers, ByteCountingPushBackInputStream in) throws java.io.IOException
VersionBlock based on the supplied header and
the version block in the payload, if present.reader - ArcReader used, with access to user defined
optionsdiagnostics - diagnostics used to report errors and/or warningsheader - record header that has already been processedfieldParsers - parser used to read and validate fieldsin - InputStream used to read version blockArcVersionBlockjava.io.IOException - if an I/O exception occurs in the process of reading
version blockprotected void validateContentType()
protected void processPayload(ByteCountingPushBackInputStream in, ArcReader reader) throws java.io.IOException
processPayload in class ArcRecordBasein - input stream containing the payloadreader - ArcReader used, with access to user defined
optionsjava.io.IOException - if an I/O exception occurs while reading the payloadpublic java.lang.String toString()
toString in class ArcRecordBaseCopyright © 2011–2022. All rights reserved.