MCPcopy Create free account
hub / github.com/Giyn/LiveChat / bytes2Int

Method bytes2Int

src/pers/giyn/LiveChat/server/utils/Utils.java:369–376  ·  view source on GitHub ↗
(byte[] bytes)

Source from the content-addressed store, hash-verified

367
368
369 public static int bytes2Int(byte[] bytes) {
370 int int1 = bytes[3] & 0xff;
371 int int2 = (bytes[2] & 0xff) << 8;
372 int int3 = (bytes[1] & 0xff) << 16;
373 int int4 = (bytes[0] & 0xff) << 24;
374
375 return int1 | int2 | int3 | int4;
376 }
377
378 public static byte[] BytesCapture(byte[] src, int offset, int length) {
379 byte[] result = new byte[length];

Callers 4

fileUnPackMethod · 0.95
friendListUnPackMethod · 0.95
messageUnPackMethod · 0.95
loginSucessUnPackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected