com.imagero.uio.buffer
Class OutputStreamBuffer

java.lang.Object
  extended bycom.imagero.uio.buffer.ByteBuffer
      extended bycom.imagero.uio.buffer.OutputStreamBuffer
All Implemented Interfaces:
Buffer, MutableBuffer

public class OutputStreamBuffer
extends ByteBuffer
implements MutableBuffer


Constructor Summary
OutputStreamBuffer(java.io.OutputStream out, byte[] data)
           
 
Method Summary
 void flush()
          Writes data to outputStream and immediately releases buffer and drops reference to OutputStream.
 void setDirty()
           
 
Methods inherited from class com.imagero.uio.buffer.ByteBuffer
getData, getData, isDirty, length
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.imagero.uio.buffer.Buffer
getData, getData, isDirty, length
 

Constructor Detail

OutputStreamBuffer

public OutputStreamBuffer(java.io.OutputStream out,
                          byte[] data)
Method Detail

flush

public void flush()
           throws java.io.IOException
Writes data to outputStream and immediately releases buffer and drops reference to OutputStream. OutputStreamBuffer can be flushed only once.

Specified by:
flush in interface MutableBuffer
Throws:
java.io.IOException

setDirty

public void setDirty()
Specified by:
setDirty in interface MutableBuffer