Class ByteBufferOutputStream

java.lang.Object
java.io.OutputStream
io.fusionauth.http.io.ByteBufferOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ByteBufferOutputStream extends OutputStream
Implements an OutputStream that stores all the bytes in a growing buffer and then can return a ByteBuffer that wraps the buffer. This is more efficient than using the toByteArray method of ByteArrayOutputStream, which makes a copy.
Author:
Brian Pontarelli
  • Constructor Details

    • ByteBufferOutputStream

      public ByteBufferOutputStream()
    • ByteBufferOutputStream

      public ByteBufferOutputStream(int size, int maxCapacity)
  • Method Details