Class SoftLimitBoundedByteArrayOutputStream

java.lang.Object
java.io.OutputStream
org.apache.nifi.processors.standard.util.SoftLimitBoundedByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class SoftLimitBoundedByteArrayOutputStream extends OutputStream
  • Field Details

    • buffer

      private final byte[] buffer
    • limit

      private int limit
    • count

      private int count
  • Constructor Details

    • SoftLimitBoundedByteArrayOutputStream

      public SoftLimitBoundedByteArrayOutputStream(int capacity)
    • SoftLimitBoundedByteArrayOutputStream

      public SoftLimitBoundedByteArrayOutputStream(int capacity, int limit)
  • Method Details

    • write

      public void write(int b) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • reset

      public void reset(int newlim)
    • reset

      public void reset()
    • getLimit

      public int getLimit()
    • getBuffer

      public byte[] getBuffer()
    • size

      public int size()