Class FastByteArrayOutputStream

java.lang.Object
java.io.OutputStream
de.intarsys.tools.stream.FastByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class FastByteArrayOutputStream extends OutputStream
  • Field Details

    • buf

      protected byte[] buf
      The buffer where data is stored.
    • count

      protected int count
      The number of valid bytes in the buffer.
  • Constructor Details

    • FastByteArrayOutputStream

      public FastByteArrayOutputStream()
    • FastByteArrayOutputStream

      public FastByteArrayOutputStream(int size)
  • Method Details

    • getBytes

      public byte[] getBytes()
    • reset

      public void reset()
    • size

      public int size()
    • toByteArray

      public byte[] toByteArray()
    • write

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

      public void write(int b)
      Specified by:
      write in class OutputStream