read

open suspend override fun read(b: ByteBuffer): Int

Reads bytes from the input stream into the specified ByteBuffer.

An attempt is made to read b.remaining() bytes, but a smaller number may be read.

Return

The number of bytes read, or -1 if the end of the file is reached.