The following code can be used to convert a byte array (containing the bytes of a long) into a long. public static long byteArrayToLong(byte[] bytes) { long l = 0; for (int i=0; i<8; i++) { l <<= 8; l ^= (long) bytes[i] & 0xff; } return l; } This is the reverse of “How […]
Trending Articles
More Pages to Explore .....