Package io.github.jmcleodfoss.pst
Interface BTreeNode
- All Known Subinterfaces:
BTreeLeaf
- All Known Implementing Classes:
BTreeOnHeap
,LPTLeaf
,NBTEntry
,NodeSubnodeBTree
,PagedBTree
,SubnodeBTree
public interface BTreeNode
The BTreeNode interface defines the functions required for intermediate and leaf B-tree nodes.
- See Also:
BTree
,BTreeLeaf
-
Method Summary
Modifier and Type Method Description int
actualSize(io.github.jmcleodfoss.pst.BTree.Context<io.github.jmcleodfoss.pst.BTree,BTreeLeaf> context)
The actualSize function must returns the actual number of bytes read from the input stream to populate this node.TableModel
getNodeTableModel()
Get a table model which can be used to describe this node.String
getNodeText()
Retrieve text for this node.long
key()
Obtain the lookup 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.
-
Method Details
-
actualSize
int actualSize(io.github.jmcleodfoss.pst.BTree.Context<io.github.jmcleodfoss.pst.BTree,BTreeLeaf> context)The actualSize function must returns the actual number of bytes read from the input stream to populate this node. This is used with the defined size given in the B-tree metadata (if present) to determine how many bytes must be skipped between entries.- Parameters:
context
- The context (PST object and other information) from which to retrieve the size.- Returns:
- The size of the entry, including the number of bytes skipped between entries.
-
getNodeTableModel
TableModel getNodeTableModel()Get a table model which can be used to describe this node.- Returns:
- A TableModel describing this node.
-
getNodeText
String getNodeText()Retrieve text for this node.- Returns:
- A String which may be used to describe the node, typically within a JTree display for the B-tree.
-
key
long key()Obtain the lookup key for this node.- Returns:
- The key for this node. This is guaranteed to be the smallest key of all leaf nodes descended from this node.
-
rawData
Provide a mechanism to read the data from the node via a ByteBuffer.- 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.
-