Here you can find the source of byte2long(byte[] data)
public static final long byte2long(byte[] data)
//package com.java2s; public class Main { public static final long byte2long(byte[] data) { if (data != null && data.length == 8) { return (((data[7] & 0xffL) << 56) | ((data[6] & 0xffL) << 48) | ((data[5] & 0xffL) << 40) | ((data[4] & 0xffL) << 32) | ((data[3] & 0xffL) << 24) | ((data[2] & 0xffL) << 16) | ((data[1] & 0xffL) << 8) | (data[0] & 0xffL)); }/* ww w. j a v a 2 s .c o m*/ return 0; } }