pyrasun.eio.util
Class ByteBufferInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended bypyrasun.eio.util.ByteBufferInputStream

public class ByteBufferInputStream
extends java.io.InputStream

An old style Javaesque InputStream with an NIO ByteBuffer behind it. You can replace the underlying ByteBuffer at will, which is alot nicer than creating new streams all the time. Generally used in association with ReadWriteEndpoint.getInputBuffer(). And no, Cameron, I still don't support marks.


Constructor Summary
ByteBufferInputStream(java.nio.ByteBuffer buffer)
           
 
Method Summary
 int available()
           
 void close()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int offset, int length)
           
 void setByteBuffer(java.nio.ByteBuffer buffer)
           
 
Methods inherited from class java.io.InputStream
mark, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(java.nio.ByteBuffer buffer)
Method Detail

setByteBuffer

public void setByteBuffer(java.nio.ByteBuffer buffer)

available

public int available()

close

public void close()

markSupported

public boolean markSupported()

read

public int read()

read

public int read(byte[] b)

read

public int read(byte[] b,
                int offset,
                int length)


Pyrasun EmberIO