readBytes

abstract fun readBytes(file: Path): ByteArray(source)

Reads the entire content of a file into a byte array.

Return

A byte array containing the entire content of the file.

Parameters

file

The path to the file to be read.

Throws

IOException

If an I/O error occurs while reading the file.