binary-streams / loggersoft.kotlin.streams / StreamFile / 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