MCPcopy Create free account
hub / github.com/Youlor/unpacker / getLong

Method getLong

dexfixer/src/com/android/dx/util/ByteArray.java:158–170  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 1

parse0Method · 0.45

Calls 3

checkOffsetsMethod · 0.95
getByte0Method · 0.95
getUnsignedByte0Method · 0.95

Tested by

no test coverage detected