Here you can find the source of getLong(byte[] bytes)
public static long getLong(byte[] bytes)
//package com.java2s; public class Main { public static long getLong(byte[] bytes) { return (0xffL & (long) bytes[0]) | (0xff00L & ((long) bytes[1] << 8)) | (0xff0000L & ((long) bytes[2] << 16)) | (0xff000000L & ((long) bytes[3] << 24)) | (0xff00000000L & ((long) bytes[4] << 32)) | (0xff0000000000L & ((long) bytes[5] << 40)) | (0xff000000000000L & ((long) bytes[6] << 48)) | (0xff00000000000000L & ((long) bytes[7] << 56)); }//w w w .ja v a 2s . c o m }