Package com.pixelmed.scpecg
Class SectionHeader
java.lang.Object
com.pixelmed.scpecg.SectionHeader
A class to encapsulate the header portion of an SCP-ECG section.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongintbyte[]intintlongintgetTree()Get the contents of the header as a tree for display.getTree(SCPTreeRecord parent) Get the contents of the header as a tree for display, constructing it if not already done.longread(BinaryInputStream i, long byteOffset) Read the section header from a stream.toString()Dump the header as aString.
-
Field Details
-
tree
-
-
Constructor Details
-
SectionHeader
public SectionHeader()
-
-
Method Details
-
getSectionCRC
public int getSectionCRC() -
getSectionIDNumber
public int getSectionIDNumber() -
getSectionLength
public long getSectionLength() -
getSectionVersionNumber
public int getSectionVersionNumber() -
getProtocolVersionNumber
public int getProtocolVersionNumber() -
getReservedBytes
public byte[] getReservedBytes() -
getBytesRead
public long getBytesRead() -
getByteOffset
public long getByteOffset() -
read
Read the section header from a stream.
- Parameters:
i- the input streambyteOffset- byte offset- Returns:
- the number of bytes read
- Throws:
IOException
-
toString
Dump the header as a
String. -
getTree
Get the contents of the header as a tree for display.
- Returns:
- the section as a tree, or null if not constructed
-
getTree
Get the contents of the header as a tree for display, constructing it if not already done.
- Parameters:
parent- the node to which this section is to be added if it needs to be created de novo- Returns:
- the header as a tree
-