writeShortLe

Writes two bytes containing short, in the little-endian order, to this sink.

Parameters

short

the short integer to be written.

Throws

when the sink is closed.

when some I/O error occurs.

Samples

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

fun main() { 
   //sampleStart 
   val buffer = Buffer()
buffer.writeShortLe(0x1234)
assertEquals(0x3412, buffer.readShort()) 
   //sampleEnd
}