Package nom.tam.util

Class ByteBufferOutputStream

java.lang.Object
java.io.OutputStream
nom.tam.util.ByteBufferOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ByteBufferOutputStream extends OutputStream
Stream interface for writing to a ByteBuffer (primarily for internal use)
See Also:
  • Constructor Details

    • ByteBufferOutputStream

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