LookAheadSession

interface LookAheadSession

Deprecated: Use read { } instead.

Functions

consumed

abstract fun consumed(n: Int): Unit

Marks n bytes as consumed so the corresponding range becomes available for writing

request

abstract fun request(skip: Int, atLeast: Int): ByteBuffer?

Request byte buffer range skipping skip bytes and atLeast bytes length

Extension Functions

consumeEachRemaining

fun LookAheadSession.consumeEachRemaining(
    visitor: (ByteBuffer) -> Boolean
): Unit

Inheritors

LookAheadSuspendSession

interface LookAheadSuspendSession : LookAheadSession