writeUByte

Writes am unsigned byte to this sink.

Parameters

byte

the byte to be written.

Throws

when the sink is closed.

Samples

import kotlinx.io.*
import kotlin.test.*

fun main() { 
   //sampleStart 
   val buffer = Buffer()
buffer.writeUByte(255U)

assertContentEquals(byteArrayOf(-1), buffer.readByteArray()) 
   //sampleEnd
}