net.metanotion.util
Class ByteChunkInputStream

java.lang.Object
  extended by net.metanotion.util.ByteChunkInputStream
All Implemented Interfaces:
ObjectInputStream<byte[]>

public final class ByteChunkInputStream
extends java.lang.Object
implements ObjectInputStream<byte[]>


Constructor Summary
ByteChunkInputStream(java.io.InputStream is)
           
 
Method Summary
 int available()
          Return how many objects are available for reading.
 void close()
          Close the stream.
 boolean isEOF()
          Determine if the stream has been closed.
 byte[] read()
          Return the next object in the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteChunkInputStream

public ByteChunkInputStream(java.io.InputStream is)
Method Detail

available

public int available()
Description copied from interface: ObjectInputStream
Return how many objects are available for reading.

Specified by:
available in interface ObjectInputStream<byte[]>
Returns:
The number of objects that could be read without blocking.

read

public byte[] read()
Description copied from interface: ObjectInputStream
Return the next object in the stream.

Specified by:
read in interface ObjectInputStream<byte[]>
Returns:
the next object in the stream.

isEOF

public boolean isEOF()
Description copied from interface: ObjectInputStream
Determine if the stream has been closed.

Specified by:
isEOF in interface ObjectInputStream<byte[]>
Returns:
true if the stream is closed.

close

public void close()
Description copied from interface: ObjectInputStream
Close the stream.

Specified by:
close in interface ObjectInputStream<byte[]>