Package one.microstream.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
one.microstream.io.ByteBufferInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class ByteBufferInputStream extends InputStream
Wrapper for
ByteBuffer
s to be used as an InputStream
.
If you need InputStream.mark(int)
and InputStream.reset()
to work,
simply wrap this one in a BufferedInputStream
.
-
Method Summary
Modifier and Type Method Description int
available()
static ByteBufferInputStream
New(Iterable<? extends ByteBuffer> sourceBuffers)
static ByteBufferInputStream
New(ByteBuffer sourceBuffer)
int
read()
int
read(byte[] bytes, int offset, int length)
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Method Details
-
New
-
New
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-