Class ReverseByteArrayOutputStream

java.lang.Object
java.io.OutputStream
com.beanit.asn1bean.ber.ReverseByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ReverseByteArrayOutputStream extends OutputStream
  • Field Details

    • buffer

      public byte[] buffer
    • index

      public int index
  • Constructor Details

    • ReverseByteArrayOutputStream

      public ReverseByteArrayOutputStream(int bufferSize)
      Creates a ReverseByteArrayOutputStream with a byte array of size bufferSize . The buffer will not be resized automatically. Use ReverseByteArrayOutputStream(int, boolean) instead if you want the buffer to be dynamically resized.
      Parameters:
      bufferSize - the size of the underlying buffer
    • ReverseByteArrayOutputStream

      public ReverseByteArrayOutputStream(int bufferSize, boolean automaticResize)
    • ReverseByteArrayOutputStream

      public ReverseByteArrayOutputStream(byte[] buffer)
    • ReverseByteArrayOutputStream

      public ReverseByteArrayOutputStream(byte[] buffer, int startingIndex)
    • ReverseByteArrayOutputStream

      public ReverseByteArrayOutputStream(byte[] buffer, int startingIndex, boolean automaticResize)
  • Method Details

    • write

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

      public void write(byte arg0)
    • write

      public void write(byte[] byteArray)
      Overrides:
      write in class OutputStream
    • getArray

      public byte[] getArray()
      Returns a new array containing the subarray of the stream array that contains the coded content.
      Returns:
      a new array containing the subarray of the stream array
    • getByteBuffer

      public ByteBuffer getByteBuffer()
    • reset

      public void reset()