Package org.apache.druid.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
org.apache.druid.io.ByteBufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Streams bytes from the
ByteBuffer's position to the limit as InputStream.-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferInputStream(ByteBuffer buffer) Does *not* make a copy of the given buffer, so the position of the given buffer is incremented, as the created InputStream is used. -
Method Summary
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Constructor Details
-
ByteBufferInputStream
Does *not* make a copy of the given buffer, so the position of the given buffer is incremented, as the created InputStream is used.
-
-
Method Details
-
read
public int read()- Specified by:
readin classInputStream
-
read
public int read(byte[] bytes, int off, int len) - Overrides:
readin classInputStream
-
available
public int available()- Overrides:
availablein classInputStream
-