Gets the signed long value at a particular offset. @param off >= 0, < (size() - 7); offset to fetch @return signed int at that offset
(int off)
| 156 | * @return {@code signed int} at that offset |
| 157 | */ |
| 158 | public long getLong(int off) { |
| 159 | checkOffsets(off, off + 8); |
| 160 | int part1 = (getByte0(off) << 24) | |
| 161 | (getUnsignedByte0(off + 1) << 16) | |
| 162 | (getUnsignedByte0(off + 2) << 8) | |
| 163 | getUnsignedByte0(off + 3); |
| 164 | int part2 = (getByte0(off + 4) << 24) | |
| 165 | (getUnsignedByte0(off + 5) << 16) | |
| 166 | (getUnsignedByte0(off + 6) << 8) | |
| 167 | getUnsignedByte0(off + 7); |
| 168 | |
| 169 | return (part2 & 0xffffffffL) | ((long) part1) << 32; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Gets the {@code unsigned byte} value at a particular offset. |
no test coverage detected