Package io.github.jmcleodfoss.pst
Class LPTLeaf
java.lang.Object
io.github.jmcleodfoss.pst.LPTLeaf
- Direct Known Subclasses:
NBTEntry
public abstract class LPTLeaf extends Object implements BTreeLeaf
The LPTLeaf class is the base class for node and sub-node B-Tree leaf entries, both of which may be used to create table
contexts.
-
Field Summary
Fields Modifier and Type Field Description io.github.jmcleodfoss.pst.BID
bidData
The block ID of the data block for this node in the B-treeio.github.jmcleodfoss.pst.BID
bidSubnode
The block ID of the subnode B-tree for this node in the B-treeprotected io.github.jmcleodfoss.pst.DataContainer
dc
The data container holding the information read in.NID
nid
The node ID of this node in the B-tree.protected static String
nm_bidData
protected static String
nm_bidSubnode
protected static String
nm_nid
protected static String
nm_nid_padding
-
Constructor Summary
Constructors Modifier Constructor Description protected
LPTLeaf(ByteBuffer byteBuffer, io.github.jmcleodfoss.pst.DataDefinition[]... fields)
Create the base object: read in the fields, and retrieve the data common to all derived classes. -
Method Summary
Modifier and Type Method Description TableModel
getNodeTableModel()
Get a table model which can be used to describe this node.String
getNodeText()
Retrieve text for this node.long
key()
Return the B-tree search key for this node.ByteBuffer
rawData(io.github.jmcleodfoss.pst.BlockMap bbt, PSTFile pstFile)
Provide a mechanism to read the data from the node via a ByteBuffer.String
toString()
Provide a description of a node B-tree leaf node.
-
Field Details
-
dc
protected io.github.jmcleodfoss.pst.DataContainer dcThe data container holding the information read in. -
nid
The node ID of this node in the B-tree. -
bidData
public final io.github.jmcleodfoss.pst.BID bidDataThe block ID of the data block for this node in the B-tree -
bidSubnode
public final io.github.jmcleodfoss.pst.BID bidSubnodeThe block ID of the subnode B-tree for this node in the B-tree -
nm_nid
- See Also:
- Constant Field Values
-
nm_nid_padding
- See Also:
- Constant Field Values
-
nm_bidData
- See Also:
- Constant Field Values
-
nm_bidSubnode
- See Also:
- Constant Field Values
-
-
Constructor Details
-
LPTLeaf
protected LPTLeaf(ByteBuffer byteBuffer, io.github.jmcleodfoss.pst.DataDefinition[]... fields) throws IOExceptionCreate the base object: read in the fields, and retrieve the data common to all derived classes.- Parameters:
byteBuffer
- The input data stream from which to read the leaf object.fields
- The descriptions of the fields to be read.- Throws:
IOException
- The PST file could not be read.
-
-
Method Details
-
getNodeTableModel
Get a table model which can be used to describe this node.- Specified by:
getNodeTableModel
in interfaceBTreeNode
- Returns:
- A TableModel describing this node.
-
getNodeText
Retrieve text for this node.- Specified by:
getNodeText
in interfaceBTreeNode
- Returns:
- A String which may be used to describe the node, typically within a JTree display for the B-tree.
-
key
public long key()Return the B-tree search key for this node. -
rawData
public ByteBuffer rawData(io.github.jmcleodfoss.pst.BlockMap bbt, PSTFile pstFile) throws IOExceptionProvide a mechanism to read the data from the node via a ByteBuffer.- Specified by:
rawData
in interfaceBTreeNode
- Parameters:
bbt
- The PST file's block B-treepstFile
- The PST file's input data stream, header, etc.- Returns:
- A ByteBuffer containing the data for this leaf node of a B-tree.
- Throws:
IOException
- The PST file could not be read.
-
toString
Provide a description of a node B-tree leaf node. This is typically used for debugging.
-