klyn.io.InputStream.readBytes
method

    public readBytes(length as Int) as Array<Byte> throws IOException

Description

Reads up to `length` bytes from the stream.

Parameters

Parameter | Description
--- | ---
`length` | Maximum number of bytes to read.

Returns

Read bytes, or an empty array at end-of-stream.

Throws

- IOException if the resource is closed, inaccessible, not a valid file, or the underlying I/O operation fails.