apidocs / com.srv4pos.commons.io / ByteArrayOutputStream / <init>

<init>

ByteArrayOutputStream()

Creates a new byte array output stream. The buffer capacity is initially 1024 bytes, though its size increases if necessary.

ByteArrayOutputStream(size: Int)

Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.

Parameters

size - Int: the initial size

Exceptions

IllegalArgumentException - if size is negative