Package org.eclipse.rdf4j.rio.hdt
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 ArrayThis 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 Modifier and Type Class Description protected static classHDTArray.Type
-
Constructor Summary
Constructors Constructor Description HDTArray()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intget(int i)Get entry from this arrayprotected intgetNrBits()Get number of bits used to encode an entryprotected abstract intgetType()Get the type of the arrayprotected voidparse(java.io.InputStream is)Parse from input streamprotected intsize()Get number of entries in this array-
Methods inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
checkControl, checkCRC, checkFormat, countToNull, getDebugPartStr, getIntegerProperty, getProperties, getProperties, mapProperties, readToNull
-
-
-
-
Method Detail
-
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
-
-