ByteArrayOutputStream

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
expect open fun close()

Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.

Link copied to clipboard
expect open fun flush()

Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

Link copied to clipboard
Link copied to clipboard
fun size(): Int

Returns the size of the ByteArrayOutputStream

Link copied to clipboard

Returns the content of the ByteArrayOutputStream as a ByteArray

Link copied to clipboard
fun write(b: Byte)
open override fun write(b: Int)

Writes a byte to the ByteArrayOutputStream

open override fun write(b: ByteArray)
open override fun write(b: ByteArray, off: Int, len: Int)

Writes a byte array to the ByteArrayOutputStream