Read an integer from packet, and advance the read position past it. Integers are encoded as two unsigned bytes with the high-order byte first, and, as far as I can tell, in little-endian order within each byte. @return The integer value read from the message
()
| 246 | * @return The integer value read from the message |
| 247 | */ |
| 248 | public int getInt() { |
| 249 | int b1 = buf[pos++] & 0xFF; |
| 250 | int b2 = buf[pos++] & 0xFF; |
| 251 | validatePos(pos); |
| 252 | return (b1 << 8) + b2; |
| 253 | } |
| 254 | |
| 255 | |
| 256 | /** |
no test coverage detected