org.apache.bookkeeper.streaming
Class LedgerInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.bookkeeper.streaming.LedgerInputStream
All Implemented Interfaces:
Closeable

public class LedgerInputStream
extends InputStream


Constructor Summary
LedgerInputStream(LedgerHandle lh)
          construct a outputstream from a ledger handle
LedgerInputStream(LedgerHandle lh, int size)
          construct a outputstream from a ledger handle
 
Method Summary
 void close()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LedgerInputStream

public LedgerInputStream(LedgerHandle lh)
                  throws BKException,
                         InterruptedException
construct a outputstream from a ledger handle

Parameters:
lh - ledger handle
Throws:
{@link - BKException}, InterruptedException
BKException
InterruptedException

LedgerInputStream

public LedgerInputStream(LedgerHandle lh,
                         int size)
                  throws BKException,
                         InterruptedException
construct a outputstream from a ledger handle

Parameters:
lh - the ledger handle
size - the size of the buffer
Throws:
{@link - BKException}, InterruptedException
BKException
InterruptedException
Method Detail

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class InputStream

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException