rossi.fstools.fs.reiserfs
Class IndirectItem

java.lang.Object
  extended byrossi.fstools.fs.reiserfs.Item
      extended byrossi.fstools.fs.reiserfs.IndirectItem

public class IndirectItem
extends Item

Representation of an indirect item.

An indirect item is an array of 32 bit block pointers. The number of pointers is given by itemLength/4


Field Summary
protected  int[] ptrs
           
 
Fields inherited from class rossi.fstools.fs.reiserfs.Item
block, buffer, bufferOffset, header
 
Constructor Summary
IndirectItem(byte[] buffer, int bufferOffset, LeafNode block, ItemHead header)
          Create an indirect item from the supplied buffer.
 
Method Summary
 int[] getEntries()
          Get the entries (pointers to blocks) contained within this item.
protected  void load()
          Load the block pointer array from the buffer.
 int numEntries()
          Get the number of entries (pointers to blocks) contained within this item.
 
Methods inherited from class rossi.fstools.fs.reiserfs.Item
getBlock, getBlockPointer, getBuffer, getBufferOffset, getHeader, getRawData, setBlock, setBuffer, setBufferOffset, setHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ptrs

protected int[] ptrs
Constructor Detail

IndirectItem

public IndirectItem(byte[] buffer,
                    int bufferOffset,
                    LeafNode block,
                    ItemHead header)
             throws FsException
Create an indirect item from the supplied buffer.

Parameters:
buffer - the buffer to load data from.
bufferOffset - offset within the buffer that data starts at
block - leaf block containing this item.
header - Item header for this item.
Method Detail

numEntries

public int numEntries()
Get the number of entries (pointers to blocks) contained within this item.

Returns:
number of entries.

getEntries

public int[] getEntries()
Get the entries (pointers to blocks) contained within this item.

Returns:
int[]

load

protected void load()
             throws FsException
Load the block pointer array from the buffer.

Throws:
FsException - if a pase error occurs.