Class WarcRecord
java.lang.Object
org.netpreserve.jwarc.Message
org.netpreserve.jwarc.WarcRecord
- Direct Known Subclasses:
Warcinfo, WarcTargetRecord
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWarcRecord.AbstractBuilder<R extends WarcRecord, B extends WarcRecord.AbstractBuilder<R,B>> static interfaceWarcRecord.Constructor<R extends WarcRecord> -
Method Summary
Modifier and TypeMethodDescriptionDigest created from "WARC-Block-Digest" header containing digest values that were calculated by applying hash functions to this content body during creation of the WARC file.Digest created while reading the WARC record body if the WARC reader is configured to calculate digests and a "WARC-Block-Digest" header is present, seeWarcReader.calculateBlockDigest().date()The instant that data capture for this record began.id()The globally unique identifier for this record.longposition()Returns the byte position of the record within the WARC file it was read from.The current record's relative ordering in a sequence of segmented records.toString()The reason why this record was truncated orWarcTruncationReason.NOT_TRUNCATED.type()The type of record.Methods inherited from class Message
body, contentType, headers, serializeHeader, version
-
Method Details
-
type
The type of record. -
id
The globally unique identifier for this record. -
date
The instant that data capture for this record began. -
truncated
The reason why this record was truncated orWarcTruncationReason.NOT_TRUNCATED. -
segmentNumber
-
blockDigest
Digest created from "WARC-Block-Digest" header containing digest values that were calculated by applying hash functions to this content body during creation of the WARC file. -
calculatedBlockDigest
Digest created while reading the WARC record body if the WARC reader is configured to calculate digests and a "WARC-Block-Digest" header is present, seeWarcReader.calculateBlockDigest(). Note: Calling this method will consume the record body exhaustively, it should be called after the record block or payload has been processed.- Throws:
IOException
-
position
public long position()Returns the byte position of the record within the WARC file it was read from.- Returns:
- the byte position of the record
- Throws:
UnsupportedOperationException- if the record was not read from a file
-
toString
-