Class HDTArray

java.lang.Object
org.eclipse.rdf4j.rio.hdt.HDTPart
org.eclipse.rdf4j.rio.hdt.HDTArray
Direct Known Subclasses:
HDTArrayLog64

abstract class HDTArray extends HDTPart
HDT Array

This part starts with a byte indicating the type of the array, followed by a byte containing the number of bits used to encode an entry in the array, and the VByte-encoded number of entries.

Then the 8-bit CRC, followed by the array data itself.

Structure:

 +------+--------+---------+------+------...
 | type | nrbits | entries | CRC8 | data
 +------+--------+---------+------+------...
 
  • Field Details

    • nrbits

      protected int nrbits
    • entries

      protected int entries
  • Constructor Details

    • HDTArray

      HDTArray()
  • Method Details

    • getType

      protected abstract int getType()
      Get the type of the array
      Returns:
      byte
    • getNrBits

      protected int getNrBits()
      Get number of bits used to encode an entry
      Returns:
      positive integer value
    • size

      protected int size()
      Get number of entries in this array
      Returns:
      positive integer value
    • get

      protected abstract int get(int i)
      Get entry from this array
      Parameters:
      i - zero-based index
      Returns:
      entry
    • 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