readMinecraftFontBytes

Reads an encoded font asset with an inclusive byte ceiling, checking overflow before appending bytes. At most one byte beyond the ceiling is consumed to distinguish exact-size input from oversized input. This synchronous operation neither retains nor closes the stream; its caller owns closing on success and failure.

Receiver

caller-owned stream whose implementation controls blocking and I/O failures.

Return

a detached byte array whose length does not exceed the ceiling.

Parameters

maximumBytes

non-negative payload ceiling.

Throws

when the ceiling is negative or exceeded.

when reading fails.