rossi.fstools.fs.fatfs
Class FatFile

java.lang.Object
  extended byrossi.fstools.fs.fatfs.FatFile
All Implemented Interfaces:
File, FsObject

public class FatFile
extends java.lang.Object
implements File

Representation of a file.


Field Summary
protected  java.util.List blkPointerList
           
protected  BlockReader reader
           
protected  FatSuperBlock sb
           
protected  long size
           
protected  long sizeRemaining
           
protected  java.util.List slackList
           
 
Constructor Summary
FatFile(FatSuperBlock sb, long fileSize, BlockReader reader)
          Create a file.
 
Method Summary
 void add(int cluster)
          Adds the specified cluster to the 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

sb

protected FatSuperBlock sb
Constructor Detail

FatFile

public FatFile(FatSuperBlock sb,
               long fileSize,
               BlockReader reader)
Create a file.

Parameters:
sb - a FatSuperBlock
fileSize - The length of the file from its Inode.
reader - a BlockReader to read the disk.
Method Detail

add

public void add(int cluster)
Adds the specified cluster to the file.

Parameters:
cluster - number of the block to be added.

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