Package com.activeviam.io
Class ByteBufferInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.activeviam.io.ByteBufferInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ByteBufferInputStream extends InputStream
Implementation of anInputStreampulling its data from aByteBuffer.- Author:
- ActiveViam
-
-
Constructor Summary
Constructors Constructor Description ByteBufferInputStream(ByteBuffer buf)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread()intread(byte[] bytes, int off, int len)-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
ByteBufferInputStream
public ByteBufferInputStream(ByteBuffer buf)
Constructor.- Parameters:
buf- the byte buffer to use
-
-
Method Detail
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] bytes, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
-