readULong

Removes eight bytes from this source and returns an unsigned long integer composed of it according to the big-endian order.

Throws

when there are not enough data to read an unsigned long value.

when the source is closed.

Samples

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

fun main() { 
   //sampleStart 
   val buffer = Buffer()
buffer.write(byteArrayOf(-1, -1, -1, -1, -1, -1, -1, -1))

assertEquals(18446744073709551615UL, buffer.readULong()) 
   //sampleEnd
}