Package org.eclipse.rdf4j.rio.hdt
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 morekey=value;
properties.Then a
NULL
byte, followed by the 16-bit CRC ($HDT
andNULL
included).Structure:
+------+------+--------+------+------------+------+-------+ | $HDT | type | format | NULL | key=value; | NULL | CRC16 | +------+------+--------+------+------------+------+-------+
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
HDTPart.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected static byte[]
HEADER_FORMAT
protected static java.lang.String
HEADER_LENGTH
private byte[]
headerData
-
Fields inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
COOKIE, name, pos, properties
-
-
Constructor Summary
Constructors Constructor Description HDTHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
getHeaderData()
Get raw header data (byte array data stored as NTriples)protected void
parse(java.io.InputStream is)
Parse from input streamprivate byte[]
parseHeaderData(java.io.InputStream is, int len)
Parse header data with metadata in NTriples format.-
Methods inherited from class org.eclipse.rdf4j.rio.hdt.HDTPart
checkControl, checkCRC, checkFormat, countToNull, getDebugPartStr, getIntegerProperty, getProperties, getProperties, mapProperties, readToNull
-
-
-
-
Field Detail
-
HEADER_FORMAT
protected static final byte[] HEADER_FORMAT
-
HEADER_LENGTH
protected static final java.lang.String HEADER_LENGTH
- See Also:
- Constant Field Values
-
headerData
private byte[] headerData
-
-
Method Detail
-
parse
protected void parse(java.io.InputStream is) throws java.io.IOException
Description copied from class:HDTPart
Parse from input stream
-
getHeaderData
protected byte[] getHeaderData()
Get raw header data (byte array data stored as NTriples)- Returns:
- byte array
-
parseHeaderData
private byte[] parseHeaderData(java.io.InputStream is, int len) throws java.io.IOException
Parse header data with metadata in NTriples format.- Parameters:
is
-len
-- Throws:
java.io.IOException
-
-