MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / toLong

Method toLong

src/main/java/core/packetproxy/common/Binary.java:110–125  ·  view source on GitHub ↗
(boolean littleEndiain)

Source from the content-addressed store, hash-verified

108 }
109
110 public long toLong(boolean littleEndiain) {
111 ByteBuffer bb = ByteBuffer.allocate(8);
112 if (littleEndiain) {
113
114 bb.order(ByteOrder.LITTLE_ENDIAN);
115 }
116 for (int i = 0; i < 8; i++) {
117
118 if (i < hexarray.length)
119 bb.put(hexarray[i]);
120 else
121 bb.put((byte) 0);
122 }
123 bb.flip();
124 return bb.getLong();
125 }
126
127 public HexString toHexString() {
128 return createHexstrFromHexarray(hexarray, 0);

Callers

nothing calls this directly

Calls 2

getLongMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected