readShortLe

Removes two bytes from this source and returns a short integer composed of it according to the little-endian order.

Throws

when there are not enough data to read a short value.

when the source is closed.

when some I/O error occurs.

Samples

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

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