com.basho.riak.client.http.util
Class BranchableInputStream

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

public class BranchableInputStream
extends 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(InputStream in)
           
BranchableInputStream(InputStream in, int initialBufferSize)
           
 
Method Summary
 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(InputStream in)

BranchableInputStream

public BranchableInputStream(InputStream in,
                             int initialBufferSize)
Method Detail

read

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

close

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

peek

public int peek()
         throws IOException
Throws:
IOException

branch

public InputStream branch()


Copyright © 2012. All Rights Reserved.