peek

suspend fun ByteReadChannel.peek(count: Int): ByteString?

Retrieves, but does not consume, up to the specified number of bytes from the current position in this ByteReadChannel.

Return

A ByteString containing the bytes that were peeked, or null if unable to peek the specified number of bytes.

Parameters

count

The number of bytes to peek.