pyrasun.eio.util
Class ByteBufferOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended bypyrasun.eio.util.ByteBufferOutputStream

public class ByteBufferOutputStream
extends java.io.OutputStream

An old style Java stream with a ByteBuffer lurking beneath it. The underlying ByteBuffer auto-expands if you overflow it. Generally used in conjunction with ReadWriteEndpoint.getOutputBuffer().


Constructor Summary
ByteBufferOutputStream(int startingSize)
           
 
Method Summary
 void flush()
           
 java.nio.ByteBuffer getByteBuffer()
           
 void realloc(int newSize)
           
 void reset()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferOutputStream

public ByteBufferOutputStream(int startingSize)
Method Detail

reset

public void reset()

getByteBuffer

public java.nio.ByteBuffer getByteBuffer()

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)

realloc

public void realloc(int newSize)

flush

public void flush()


Pyrasun EmberIO