clear
Discards all bytes in this buffer.
Call to this method is equivalent to skip with byteCount = size
.
Samples
import kotlinx.io.*
import kotlin.test.*
fun main() {
//sampleStart
val buffer = Buffer()
buffer.write(ByteArray(1024))
assertFalse(buffer.exhausted())
buffer.clear()
assertTrue(buffer.exhausted())
//sampleEnd
}