Class ByteArrayDataOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.lang.AutoCloseable

    public class ByteArrayDataOutputStream
    extends java.io.DataOutputStream
    DataOutputStream sub class that allows for the lazy writing of length values.

    These length values are inserted into the bytes when then final bytes are read.

    Author:
    Stuart Douglas
    • Field Summary

      • Fields inherited from class java.io.DataOutputStream

        written
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBytes()  
      LazySize writeSize()  
      • Methods inherited from class java.io.DataOutputStream

        flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
      • Methods inherited from class java.io.FilterOutputStream

        close, write
      • Methods inherited from class java.io.OutputStream

        nullOutputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.io.DataOutput

        write
    • Constructor Detail

      • ByteArrayDataOutputStream

        public ByteArrayDataOutputStream​(java.io.ByteArrayOutputStream bytes)
      • ByteArrayDataOutputStream

        public ByteArrayDataOutputStream()
    • Method Detail

      • writeSize

        public LazySize writeSize()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getBytes

        public byte[] getBytes()