request

abstract fun request(byteCount: Long): Boolean(source)

Attempts to fill the buffer with at least byteCount bytes of data from the underlying source and returns a value indicating if the requirement was successfully fulfilled.

false value returned by this method indicates that the underlying source was exhausted before filling the buffer with byteCount bytes of data.

Parameters

byteCount

the number of bytes that the buffer should contain.

Throws

when the source is closed.

when some I/O error occurs.

Samples