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
Constructor
Description
`ByteArrayDataOutputStream()`
`ByteArrayDataOutputStream(ByteArrayOutputStream bytes)`

## Method Summary

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 Details

### ByteArrayDataOutputStream

public ByteArrayDataOutputStream(ByteArrayOutputStream bytes)

### ByteArrayDataOutputStream

public ByteArrayDataOutputStream()

## Method Details

### writeSize

public LazySize writeSize() throws IOException

Throws:
  `IOException`

### getBytes

public byte[] getBytes()