rossi.fstools.fs.reiserfs
Class ReiserFile

java.lang.Object
  extended byrossi.fstools.fs.reiserfs.ReiserFile
All Implemented Interfaces:
File, FsObject

public class ReiserFile
extends java.lang.Object
implements File

Representation of a file. The file data is build up from DirectItems and IndirectItems.


Field Summary
protected  java.util.List blkPointerList
           
protected  BlockReader reader
           
protected  long size
           
protected  long sizeRemaining
           
protected  java.util.List slackList
           
 
Constructor Summary
ReiserFile(long fileSize, BlockReader reader)
          Crate a new file.
 
Method Summary
 void add(DirectItem itm)
          Add a DirectItem to the file.
 void add(IndirectItem ind)
          Adds an IndirectItem to this file.
 BlockPointerInputStream getData()
          Get a BlockPointerInputStream to the data contained within the file.
 BlockPointerInputStream getSlack()
          Get a BlockPointerInputStream to the slack space contained at the end of the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blkPointerList

protected java.util.List blkPointerList

slackList

protected java.util.List slackList

size

protected long size

sizeRemaining

protected long sizeRemaining

reader

protected BlockReader reader
Constructor Detail

ReiserFile

public ReiserFile(long fileSize,
                  BlockReader reader)
Crate a new file.

Parameters:
fileSize - the length of the file from the StatDataItem
reader - a BlockReader to read the physical disk with
Method Detail

add

public void add(IndirectItem ind)
Adds an IndirectItem to this file. Each block pointed to within the IndirectItem will be added in sequence to the list of blocks for this file.

Parameters:
ind - a IndirectItem

add

public void add(DirectItem itm)
Add a DirectItem to the file. Files can be composed of a combination of direct and indirect items.

Parameters:
itm - a DirectItem

getData

public BlockPointerInputStream getData()
Description copied from interface: File
Get a BlockPointerInputStream to the data contained within the file.

Specified by:
getData in interface File
Returns:
BlockPointerInputStream - an input stream of the file's data.
See Also:
BlockPointerInputStream

getSlack

public BlockPointerInputStream getSlack()
Description copied from interface: File
Get a BlockPointerInputStream to the slack space contained at the end of the file.

Specified by:
getSlack in interface File
Returns:
BlockPointerInputStream - an input stream of the file's slack data.
See Also:
BlockPointerInputStream