Here you can find the source of byteArrayToLong(byte[] b)
public static final long byteArrayToLong(byte[] b)
//package com.java2s; public class Main { public static final long byteArrayToLong(byte[] b) { return (long) (b[0] << 56) + ((long) (b[1] & 0xFF) << 48) + ((long) (b[2] & 0xFF) << 40) + ((long) (b[3] & 0xFF) << 32) + ((long) (b[4] & 0xFF) << 24) + ((long) (b[5] & 0xFF) << 16) + ((long) (b[6] & 0xFF) << 8) + ((long) b[7] & 0xFF); }/*w ww . j a v a2 s . c o m*/ }