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
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 org.eclipse.rdf4j.rio.hdt.HDTPart
COOKIE, name, pos, properties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
get
(int i) Get entry from this arrayprotected int
Get number of bits used to encode an entryprotected abstract int
getType()
Get the type of the arrayprotected void
parse
(InputStream is) Parse from input streamprotected int
size()
Get number of entries in this arrayMethods inherited from class org.eclipse.rdf4j.rio.hdt.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:HDTPart
Parse from input stream- Specified by:
parse
in classHDTPart
- Parameters:
is
-- Throws:
IOException
-