Class CdxRecord

java.lang.Object
org.netpreserve.jwarc.cdx.CdxRecord

public class CdxRecord extends Object
A single CDX record.
  • Method Details

    • get

      public String get(int field)
      Returns the value of the given field. See CdxFields for a list of valid fields.
    • surt

      public String surt()
      Returns the value of the 'normalized SURT' (N) field.
    • date

      public Instant date()
    • filename

      public String filename()
    • target

      public String target()
    • targetURI

      public URI targetURI()
    • size

      public Long size()
      Length of the WARC record in bytes. Including headers and measured after any compression is applied.
    • position

      public Long position()
      Position in bytes of the record in the WARC file.
    • status

      public Integer status()
      HTTP response status code.
    • digest

      public String digest()
      A cryptographic digest of the response payload. Most commonly this is a SHA-1 digest in base 32 or an MD5 digest in hexadecimal.
    • redirect

      public String redirect()
      The value of the Location HTTP header for redirect responses.
    • contentType

      public MediaType contentType()
    • format

      public CdxFormat format()
      Returns the CDX format of this record.
    • values

      public List<String> values()
      Returns an unmodifiable list of the field values in this record.
    • toString

      public String toString()
      Returns this record as a space-separated string.
      Overrides:
      toString in class Object