Class HDTHeader

java.lang.Object
org.eclipse.rdf4j.rio.hdt.HDTPart
org.eclipse.rdf4j.rio.hdt.HDTHeader

class HDTHeader extends HDTPart
HDT Header Part.

This part starts with $HDT, followed by a byte indicating the type of the part, the NULL-terminated string for the format, and optionally one or more key=value; properties.

Then a NULL byte, followed by the 16-bit CRC ($HDT and NULL included).

Structure:

 +------+------+--------+------+------------+------+-------+
 | $HDT | type | format | NULL | key=value; | NULL | CRC16 |
 +------+------+--------+------+------------+------+-------+
 
  • Field Details

    • HEADER_FORMAT

      protected static final byte[] HEADER_FORMAT
    • HEADER_LENGTH

      protected static final String HEADER_LENGTH
      See Also:
    • headerData

      private byte[] headerData
  • Constructor Details

    • HDTHeader

      HDTHeader()
  • Method Details

    • parse

      protected void parse(InputStream is) throws IOException
      Description copied from class: HDTPart
      Parse from input stream
      Specified by:
      parse in class HDTPart
      Parameters:
      is -
      Throws:
      IOException
    • getHeaderData

      protected byte[] getHeaderData()
      Get raw header data (byte array data stored as NTriples)
      Returns:
      byte array
    • parseHeaderData

      private byte[] parseHeaderData(InputStream is, int len) throws IOException
      Parse header data with metadata in NTriples format.
      Parameters:
      is -
      len -
      Throws:
      IOException