de.lmu.ifi.dbs.elki.persistent
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
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. |
Method Summary |
int |
read()
|
int |
read(byte[] b,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffer
final ByteBuffer buffer
- The actual buffer we're using.
ByteBufferInputStream
public ByteBufferInputStream(ByteBuffer buffer)
- Constructor.
- Parameters:
buffer
- ByteBuffer to wrap.
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