public class WarcRecord extends Message
| Modifier and Type | Class and Description |
|---|---|
static class |
WarcRecord.AbstractBuilder<R extends WarcRecord,B extends WarcRecord.AbstractBuilder<R,B>> |
static interface |
WarcRecord.Constructor<R extends WarcRecord> |
| Modifier and Type | Method and Description |
|---|---|
Optional<WarcDigest> |
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.
|
Optional<WarcDigest> |
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,
see
WarcReader.calculateBlockDigest(). |
java.time.Instant |
date()
The instant that data capture for this record began.
|
URI |
id()
The globally unique identifier for this record.
|
Optional<Long> |
segmentNumber()
The current record's relative ordering in a sequence of segmented records.
|
String |
toString() |
WarcTruncationReason |
truncated()
The reason why this record was truncated or
WarcTruncationReason.NOT_TRUNCATED. |
String |
type()
The type of record.
|
body, contentType, headers, serializeHeader, versionpublic String type()
public URI id()
public java.time.Instant date()
public WarcTruncationReason truncated()
WarcTruncationReason.NOT_TRUNCATED.public Optional<Long> segmentNumber()
Mandatory for all records in the sequence starting from 1.
public Optional<WarcDigest> blockDigest()
public Optional<WarcDigest> calculatedBlockDigest() throws IOException
WarcReader.calculateBlockDigest().
Note: Calling this method will consume the record body exhaustively, it
should be called after the record block or payload has been processed.IOExceptionCopyright © 2024. All rights reserved.