Class BufferingOutputStream

java.lang.Object
java.io.OutputStream
org.bouncycastle.util.io.BufferingOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class BufferingOutputStream extends OutputStream
An output stream that buffers data to be feed into an encapsulated output stream.

The stream zeroes out the internal buffer on each flush.

  • Constructor Details

    • BufferingOutputStream

      public BufferingOutputStream(OutputStream other)
      Create a buffering stream with the default buffer size (4096).
      Parameters:
      other - output stream to be wrapped.
    • BufferingOutputStream

      public BufferingOutputStream(OutputStream other, int bufferSize)
      Create a buffering stream with a specified buffer size.
      Parameters:
      other - output stream to be wrapped.
      bufferSize - size in bytes for internal buffer.
  • Method Details