Here you can find the source of Bytes2Int64(byte[] sour, int offset)
public static long Bytes2Int64(byte[] sour, int offset)
//package com.java2s; public class Main { public static long Bytes2Int64(byte[] sour, int offset) { return ((((long) sour[offset] << 56) & 0xFF00000000000000L) | (((long) sour[offset + 1] << 48) & 0x00FF000000000000L) | (((long) sour[offset + 2] << 40) & 0x0000FF0000000000L) | (((long) sour[offset + 3] << 32) & 0x000000FF00000000L) | ((sour[offset + 4] << 24) & 0x00000000FF000000L) | ((sour[offset + 5] << 16) & 0x0000000000FF0000L) | ((sour[offset + 6] << 8) & 0x000000000000FF00L) | (sour[offset + 7] & 0x00000000000000FFL)); }// w ww . j a v a 2s. c o m }