Class LPTLeaf

java.lang.Object
io.github.jmcleodfoss.pst.LPTLeaf
All Implemented Interfaces:
BTreeLeaf, BTreeNode
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-tree
    io.github.jmcleodfoss.pst.BID bidSubnode
    The block ID of the subnode B-tree for this node in the B-tree
    protected 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.github.jmcleodfoss.pst.BTreeNode

    actualSize
  • Field Details

  • Constructor Details

    • LPTLeaf

      protected LPTLeaf​(ByteBuffer byteBuffer, io.github.jmcleodfoss.pst.DataDefinition[]... fields) throws IOException
      Create 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

      public TableModel getNodeTableModel()
      Get a table model which can be used to describe this node.
      Specified by:
      getNodeTableModel in interface BTreeNode
      Returns:
      A TableModel describing this node.
    • getNodeText

      public String getNodeText()
      Retrieve text for this node.
      Specified by:
      getNodeText in interface BTreeNode
      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.
      Specified by:
      key in interface BTreeNode
      Returns:
      The key for a B-tree search.
    • rawData

      public ByteBuffer rawData​(io.github.jmcleodfoss.pst.BlockMap bbt, PSTFile pstFile) throws IOException
      Provide a mechanism to read the data from the node via a ByteBuffer.
      Specified by:
      rawData in interface BTreeNode
      Parameters:
      bbt - The PST file's block B-tree
      pstFile - 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

      public String toString()
      Provide a description of a node B-tree leaf node. This is typically used for debugging.
      Overrides:
      toString in class Object
      Returns:
      A String describing this object