Convert four bytes to an int @param b - the byte array containing the four bytes @param off - the offset @return the integer value constructed from the four bytes
(byte[] b, int off)
| 519 | * @return the integer value constructed from the four bytes |
| 520 | */ |
| 521 | public static int toInt(byte[] b, int off) { |
| 522 | return ((b[off + 3]) & 0xFF) + (((b[off + 2]) & 0xFF) << 8) + (((b[off + 1]) & 0xFF) << 16) + |
| 523 | (((b[off]) & 0xFF) << 24); |
| 524 | } |
| 525 | |
| 526 | /** |
| 527 | * Convert eight bytes to a long |
no outgoing calls