ktor-io / io.ktor.utils.io.core / Buffer / rewind

rewind

fun rewind(count: Int = readPosition - startGap): Unit

Rewind readPosition backward to make count bytes available for reading again.

Exceptions

IllegalArgumentException - when count is too big and not enough bytes available before the readPosition