Here you can find the source of byte2long(byte[] value, int count)
public static long byte2long(byte[] value, int count)
//package com.java2s; //License from project: Apache License public class Main { public static long byte2long(byte[] value, int count) { long result = (((long) (value[0 + count]) & 0xFF) << 56) | (((long) (value[1 + count]) & 0xFF) << 48) | (((long) (value[2 + count]) & 0xFF) << 40) | (((long) (value[3 + count]) & 0xFF) << 32) | (((long) (value[4 + count]) & 0xFF) << 24) | (((long) (value[5 + count]) & 0xFF) << 16) | (((long) (value[6 + count]) & 0xFF) << 8) | ((long) (value[7 + count]) & 0xFF); return result; }/*from www . j av a2 s. c o m*/ }