binary-streams / loggersoft.kotlin.streams / ProxyStreamInput / readInt

readInt

fun readInt(bytes: Int, signed: Boolean, byteOrder: ByteOrder): Long

Read integer value from the stream with specified bytes count and byteOrder. If signed is true the last bit interprets as a sign. This means that if last bit is 1 the rest of the bits higher than last bit would be filled by 1. The bytes should be in range 1..8.

Exceptions

IllegalArgumentException - , EOFException

fun readInt(byteOrder: ByteOrder): Int

Reads Int from the stream with specified byteOrder.

Exceptions

EOFException -