Class DirectByteArrayOutputStream

  • All Implemented Interfaces:,, java.lang.AutoCloseable

    public class DirectByteArrayOutputStream
    Byte array output stream that exposes the byte array directly
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getArray()  
      byte[] getArrayDirect()  
      int size()  
      void write​(int b)
      Writes the specified byte to this output stream.
      • Methods inherited from class

        close, flush, nullOutputStream, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DirectByteArrayOutputStream

        public DirectByteArrayOutputStream​(int size)
    • Method Detail

      • write

        public void write​(int b)
        Writes the specified byte to this output stream.
        Specified by:
        write in class
        b - the byte.
        Throws: - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
      • size

        public int size()
      • getArrayDirect

        public byte[] getArrayDirect()
      • getArray

        public byte[] getArray()