Package nom.tam.util

Class ByteBufferInputStream

java.lang.Object
java.io.InputStream
nom.tam.util.ByteBufferInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class ByteBufferInputStream extends InputStream
Stream interface for reading from a ByteBuffer (primarily for internal use)
See Also:
  • Constructor Details

    • ByteBufferInputStream

      public ByteBufferInputStream(ByteBuffer buffer)
      Creates an new InpuStream, which reads from a ByteBuffer starting at the current buffer position. Its read() methods can be intermixed with the get() methods of the buffer, and also with ByteBuffer.position(int), maintaining overall sequentiality of the calls. In other words, the stream's input is not decopuled from direct access to the buffer.
      Parameters:
      buffer - the buffer to read from
  • Method Details