Class UnsynchronizedByteArrayOutputStream

java.lang.Object
java.io.OutputStream
org.apache.commons.io.output.AbstractByteArrayOutputStream
org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class UnsynchronizedByteArrayOutputStream extends AbstractByteArrayOutputStream
Implements a version of AbstractByteArrayOutputStream without any concurrent thread safety.
Since:
2.7
  • Constructor Details

    • UnsynchronizedByteArrayOutputStream

      public UnsynchronizedByteArrayOutputStream()
      Creates a new byte array output stream. The buffer capacity is initially 1024 bytes, though its size increases if necessary.
    • UnsynchronizedByteArrayOutputStream

      public UnsynchronizedByteArrayOutputStream(int size)
      Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
      Parameters:
      size - the initial size
      Throws:
      IllegalArgumentException - if size is negative
  • Method Details