Class ByteBufferBackedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ByteBufferBackedInputStream extends InputStream
SimpleInputStreamimplementation that exposes currently available content of aByteBuffer.
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteBuffer_b
-
Constructor Summary
Constructors Constructor Description ByteBufferBackedInputStream(ByteBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()intread()intread(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
-
_b
protected final ByteBuffer _b
-
-
Constructor Detail
-
ByteBufferBackedInputStream
public ByteBufferBackedInputStream(ByteBuffer buf)
-
-
Method Detail
-
available
public int available()
- Overrides:
availablein classInputStream
-
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
-
-