de.lmu.ifi.dbs.elki.persistent
Class ByteBufferOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by de.lmu.ifi.dbs.elki.persistent.ByteBufferOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class ByteBufferOutputStream
extends OutputStream

Wrap an existing ByteBuffer as OutputStream.


Field Summary
(package private)  ByteBuffer buffer
          The actual buffer we're using.
 
Constructor Summary
ByteBufferOutputStream(ByteBuffer buffer)
          Constructor.
 
Method Summary
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

final ByteBuffer buffer
The actual buffer we're using.

Constructor Detail

ByteBufferOutputStream

public ByteBufferOutputStream(ByteBuffer buffer)
Constructor.

Parameters:
buffer - ByteBuffer to wrap.
Method Detail

write

public void write(int b)
Specified by:
write in class OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class OutputStream

Release 0.4.0 (2011-09-20_1324)