Class ByteBufferInputStream

java.lang.Object
java.io.InputStream
io.deephaven.io.streams.ByteBufferInputStream
All Implemented Interfaces:
Closeable, DataInput, AutoCloseable

public class ByteBufferInputStream extends InputStream implements DataInput
This is an InputStream implementation which reads from a java.nio.ByteBuffer. If a read operation crosses the end of the buffer, the BufferUnderflowException is converted to an EOFException. The stream contains no state other than that in in the buffer itself, so the buffer can be exchanged at will with the setBuffer() method.