rossi.fstools.io
Class BlockPointerInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byrossi.fstools.io.BlockPointerInputStream

public class BlockPointerInputStream
extends java.io.InputStream

An input stream composed of a list of block pointers and a block reader


Field Summary
protected  java.util.List blocks
           
protected  int bufferHead
           
protected  int currentBlock
           
protected  int currentBlockNum
           
protected  byte[] currentBuffer
           
protected  int currentOffset
           
protected  boolean isEOF
           
protected  BlockReader reader
           
 
Constructor Summary
BlockPointerInputStream(BlockReader reader, java.util.List blockList)
           
 
Method Summary
 java.util.Iterator getBlocks()
           
 int read()
           
 int read(byte[] buffer)
           
 int read(byte[] buffer, int offset, int len)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blocks

protected java.util.List blocks

reader

protected BlockReader reader

currentBlock

protected int currentBlock

currentBlockNum

protected int currentBlockNum

currentOffset

protected int currentOffset

bufferHead

protected int bufferHead

currentBuffer

protected byte[] currentBuffer

isEOF

protected boolean isEOF
Constructor Detail

BlockPointerInputStream

public BlockPointerInputStream(BlockReader reader,
                               java.util.List blockList)
Method Detail

getBlocks

public java.util.Iterator getBlocks()

read

public int read(byte[] buffer,
                int offset,
                int len)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read(byte[] buffer)
         throws java.io.IOException
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException