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

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

public class OneTokenInputStream
extends InputStream

A wrapper that reads a single element an underlying InputStream containing contains a delimited list

Author:
jlee

Constructor Summary
OneTokenInputStream(InputStream in, String delimiter)
           
 
Method Summary
 void close()
           
 boolean done()
           
 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

OneTokenInputStream

public OneTokenInputStream(InputStream in,
                           String delimiter)
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

done

public boolean done()


Copyright © 2012. All Rights Reserved.