request
Overrides ReadSession.request
Request buffer range atLeast bytes length
There are the following reasons for this function to return null
:
- not enough bytes available yet (should be at least
atLeast
bytes available) - due to buffer fragmentation it is impossible to represent the requested range as a single buffer range
- end of stream encountered and all bytes were consumed
Exceptions
Throwable
- if the channel has been closed with an exception or cancelled
Return
buffer for the requested range or null
if it is impossible to provide such a buffer view