Class BufferInputStream

  • All Implemented Interfaces:
    Closeable, DataInput, AutoCloseable

    public final class BufferInputStream
    extends InputStream
    implements DataInput
    An InputStream which reads data from a Buffer.

    A read operation against this stream will occur at the readerOffset of its underlying buffer and the readerOffset will increase during the read operation. Please note that it only reads up to the number of readable bytes determined at the moment of construction. Therefore, updating Buffer.writerOffset() will not affect the return value of available().

    This stream implements DataInput for your convenience. The endianness of the stream is always big endian.

    See Also:
    BufferOutputStream