Package org.analogweb.util
Class ByteBufferInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.analogweb.util.ByteBufferInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ByteBufferInputStream extends InputStream
- Author:
- y2k2mt.
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteBuffer
buffer
-
Constructor Summary
Constructors Constructor Description ByteBufferInputStream(ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
int
read()
int
read(byte[] bytes, int off, int len)
-
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Field Detail
-
buffer
protected final ByteBuffer buffer
-
-
Constructor Detail
-
ByteBufferInputStream
public ByteBufferInputStream(ByteBuffer buf)
-
-
Method Detail
-
available
public int available()
- Overrides:
available
in classInputStream
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] bytes, int off, int len) throws IOException
- Overrides:
read
in classInputStream
- Throws:
IOException
-
-