rossi.fstools.io
Class BlockIO
java.lang.Object
rossi.fstools.io.BlockIO
- All Implemented Interfaces:
- BlockReader
- public class BlockIO
- extends java.lang.Object
- implements BlockReader
|
Constructor Summary |
BlockIO(java.io.RandomAccessFile f,
int blockSize)
|
BlockIO(java.io.RandomAccessFile f,
int blockSize,
long offset)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
protected java.io.RandomAccessFile file
blockSize
protected int blockSize
cache
protected BlockCache cache
offset
protected long offset
BlockIO
public BlockIO(java.io.RandomAccessFile f,
int blockSize)
BlockIO
public BlockIO(java.io.RandomAccessFile f,
int blockSize,
long offset)
getBlockSize
public int getBlockSize()
- Description copied from interface:
BlockReader
- Gets the block size
- Specified by:
getBlockSize in interface BlockReader
setBlockSize
public void setBlockSize(int aBlockSize)
- Description copied from interface:
BlockReader
- Sets the block size
- Specified by:
setBlockSize in interface BlockReader
getBlock
public byte[] getBlock(int blkno)
throws java.io.IOException
- Description copied from interface:
BlockReader
- Reads a block
- Specified by:
getBlock in interface BlockReader
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Close this file
- Specified by:
close in interface BlockReader
- Throws:
java.io.IOException