Class WarcRecord

java.lang.Object
org.netpreserve.jwarc.Message
org.netpreserve.jwarc.WarcRecord
Direct Known Subclasses:
Warcinfo, WarcTargetRecord

public class WarcRecord extends Message
  • Method Details

    • type

      public String type()
      The type of record.
    • id

      public URI id()
      The globally unique identifier for this record.
    • date

      public Instant date()
      The instant that data capture for this record began.
    • truncated

      public WarcTruncationReason truncated()
      The reason why this record was truncated or WarcTruncationReason.NOT_TRUNCATED.
    • segmentNumber

      public Optional<Long> segmentNumber()
      The current record's relative ordering in a sequence of segmented records.

      Mandatory for all records in the sequence starting from 1.

    • blockDigest

      public 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.
    • calculatedBlockDigest

      public Optional<WarcDigest> calculatedBlockDigest() throws IOException
      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(). 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
    • toString

      public String toString()
      Overrides:
      toString in class Object