com.basho.riak.client.util
Class BranchableInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.basho.riak.client.util.BranchableInputStream
All Implemented Interfaces:
java.io.Closeable

public class BranchableInputStream
extends java.io.InputStream

An input stream that can be branched into other InputStreams, each maintaining its own location, with the main read() method always returning bytes from the furthest advanced branch.

Author:
jlee

Constructor Summary
BranchableInputStream(java.io.InputStream in)
           
BranchableInputStream(java.io.InputStream in, int initialBufferSize)
           
 
Method Summary
 java.io.InputStream branch()
           
 void close()
           
 int peek()
           
 int read()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchableInputStream

public BranchableInputStream(java.io.InputStream in)

BranchableInputStream

public BranchableInputStream(java.io.InputStream in,
                             int initialBufferSize)
Method Detail

read

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

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

peek

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

branch

public java.io.InputStream branch()


Copyright © 2010. All Rights Reserved.