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

java.lang.Object
  extended by java.io.InputStream
      extended by de.lmu.ifi.dbs.elki.persistent.ByteBufferInputStream
All Implemented Interfaces:
Closeable

public class ByteBufferInputStream
extends InputStream

Wrap an existing ByteBuffer as InputStream.


Field Summary
(package private)  ByteBuffer buffer
          The actual buffer we're using.
 
Constructor Summary
ByteBufferInputStream(ByteBuffer buffer)
          Constructor.
 
Method Summary
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
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

ByteBufferInputStream

public ByteBufferInputStream(ByteBuffer buffer)
Constructor.

Parameters:
buffer - ByteBuffer to wrap.
Method Detail

read

public int read()
Specified by:
read in class InputStream

read

public int read(byte[] b,
                int off,
                int len)
Overrides:
read in class InputStream

Release 0.4.0 (2011-09-20_1324)