|
|
|
@ -32,10 +32,10 @@ object ConvertUtils { |
|
|
|
|
|
|
|
|
|
fun toInt(bytes: ByteArray): Int { |
|
|
|
|
var result = 0 |
|
|
|
|
var abyte: Byte |
|
|
|
|
var byte: Byte |
|
|
|
|
for (i in bytes.indices) { |
|
|
|
|
abyte = bytes[i] |
|
|
|
|
result += (abyte.toInt() and 0xFF).shl(8 * i) |
|
|
|
|
byte = bytes[i] |
|
|
|
|
result += (byte.toInt() and 0xFF).shl(8 * i) |
|
|
|
|
} |
|
|
|
|
return result |
|
|
|
|
} |
|
|
|
|