public class SectionHeader extends Object
A class to encapsulate the header portion of an SCP-ECG section.
| Modifier and Type | Field and Description |
|---|---|
protected SCPTreeRecord |
tree |
| Constructor and Description |
|---|
SectionHeader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getByteOffset() |
long |
getBytesRead() |
int |
getProtocolVersionNumber() |
byte[] |
getReservedBytes() |
int |
getSectionCRC() |
int |
getSectionIDNumber() |
long |
getSectionLength() |
int |
getSectionVersionNumber() |
SCPTreeRecord |
getTree()
Get the contents of the header as a tree for display.
|
SCPTreeRecord |
getTree(SCPTreeRecord parent)
Get the contents of the header as a tree for display, constructing it if not already done.
|
long |
read(BinaryInputStream i,
long byteOffset)
Read the section header from a stream.
|
String |
toString()
Dump the header as a
String. |
protected SCPTreeRecord tree
public long getByteOffset()
public long getBytesRead()
public int getProtocolVersionNumber()
public byte[] getReservedBytes()
public int getSectionCRC()
public int getSectionIDNumber()
public long getSectionLength()
public int getSectionVersionNumber()
public SCPTreeRecord getTree()
Get the contents of the header as a tree for display.
public SCPTreeRecord getTree(SCPTreeRecord parent)
Get the contents of the header as a tree for display, constructing it if not already done.
parent - the node to which this section is to be added if it needs to be created de novopublic long read(BinaryInputStream i, long byteOffset) throws IOException
Read the section header from a stream.
i - the input streambyteOffset - byte offsetIOException