|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrossi.fstools.fs.reiserfs.FBlock
rossi.fstools.fs.reiserfs.LeafNode
Representation of an leaf node of the B+Tree.
This structure is the container for Items in the filesystem.
Following the block header (at offset 0x18), is an array of N ItemHeaders, followed by some free space. The from the end of the block working backwards is an array of items. The item headers need to be read first to determine where the item bodies are.
| Field Summary | |
protected ItemHead[] |
itemHeaders
|
| Fields inherited from class rossi.fstools.fs.reiserfs.FBlock |
blocknum, freeSpace, level, numItems, parent, reserved, rightKey, sb |
| Constructor Summary | |
LeafNode(ReiserSuperBlock sb,
int blocknum)
Create a new leaf node |
|
| Method Summary | |
Item |
getItem(byte[] buffer,
int offset,
ItemHead ih)
Gets an item from this block given the item header. |
Item |
getItem(byte[] buffer,
int offset,
Key key)
Returns the item matching the given key, or the next one greater. |
ItemHead[] |
getItemHeaders()
Get an array of all the ItemHeaders in this leaf. |
void |
loadFromBuffer(byte[] buffer,
int blkoffset)
Load this structure from disk. |
void |
setItemHeaders(ItemHead[] aItemHeaders)
|
| Methods inherited from class rossi.fstools.fs.reiserfs.FBlock |
createFromBuffer, getBlockHeaderSize, getBlockNum, getDataSize, getFreeSpace, getLevel, getNumItems, getParent, getReserved, getRightKey, getSuperBlock, setFreeSpace, setLevel, setNumItems, setParent, setReserved, setRightKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ItemHead[] itemHeaders
| Constructor Detail |
public LeafNode(ReiserSuperBlock sb,
int blocknum)
sb - a ReiserSuperBlock for this filesystem.blocknum - number of this block| Method Detail |
public ItemHead[] getItemHeaders()
public void setItemHeaders(ItemHead[] aItemHeaders)
public Item getItem(byte[] buffer,
int offset,
Key key)
throws FsException
FsException
public Item getItem(byte[] buffer,
int offset,
ItemHead ih)
throws FsException
buffer - contains this block at offset.offset - points to the start of this block.
FsException
public void loadFromBuffer(byte[] buffer,
int blkoffset)
throws FsException
FBlock
loadFromBuffer in interface DiskStructureloadFromBuffer in class FBlockFsException - if a parse error occursDiskStructure.loadFromBuffer(byte[], int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||