Package org.jboss.classfilewriter.util

## Class ByteArrayDataOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - java.io.FilterOutputStream
    - - java.io.DataOutputStream
      - - org.jboss.classfilewriter.util.ByteArrayDataOutputStream

All Implemented Interfaces:
  `Closeable`, `DataOutput`, `Flushable`, `AutoCloseable`

    public class ByteArrayDataOutputStream
    extends 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`

### Constructor Summary

Constructors
`ByteArrayDataOutputStream​()`
`ByteArrayDataOutputStream​(ByteArrayOutputStream bytes)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `getBytes​()`
`LazySize` `writeSize​()`

### Methods inherited from interface java.io.DataOutput

`write`

### 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.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ByteArrayDataOutputStream

    public ByteArrayDataOutputStream​(ByteArrayOutputStream bytes)

#### ByteArrayDataOutputStream

    public ByteArrayDataOutputStream​()

### Method Detail

#### writeSize

    public LazySize writeSize​()
                       throws IOException

Throws:
  `IOException`

#### getBytes

    public byte[] getBytes​()