Class ByteBufferOutputStream

java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.wildfly.clustering.marshalling.spi.ByteBufferOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class ByteBufferOutputStream extends ByteArrayOutputStream
A specialized ByteArrayOutputStream that exposes the internal buffer.
Author:
Paul Ferraro
  • Constructor Details

    • ByteBufferOutputStream

      public ByteBufferOutputStream()
    • ByteBufferOutputStream

      public ByteBufferOutputStream(OptionalInt size)
    • ByteBufferOutputStream

      public ByteBufferOutputStream(int size)
  • Method Details

    • getBuffer

      public ByteBuffer getBuffer()
      Returns the internal buffer of this output stream.
      Returns:
      the internal byte buffer.