Class HDTArray
java.lang.Object
org.eclipse.rdf4j.rio.hdt.HDTPart
org.eclipse.rdf4j.rio.hdt.HDTArray
- Direct Known Subclasses:
HDTArrayLog64
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 +------+--------+---------+------+------...
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class HDTPart
COOKIE, name, pos, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intget(int i) Get entry from this arrayprotected intGet number of bits used to encode an entryprotected abstract intgetType()Get the type of the arrayprotected voidparse(InputStream is) Parse from input streamprotected intsize()Get number of entries in this arrayMethods inherited from class HDTPart
checkControl, checkCRC, checkFormat, countToNull, getDebugPartStr, getIntegerProperty, getProperties, getProperties, mapProperties, readToNull
-
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
Description copied from class:HDTPartParse from input stream- Specified by:
parsein classHDTPart- Parameters:
is-- Throws:
IOException
-