Here you can find the source of bytesLittleToLong(byte[] data, int start)
public static long bytesLittleToLong(byte[] data, int start)
//package com.java2s; //License from project: Apache License public class Main { public static long bytesLittleToLong(byte[] data, int start) { long ret = 0; ret = 0x00000000000000ffL & data[start++]; ret |= (0x00000000000000ffL & data[start++]) << 8; ret |= (0x00000000000000ffL & data[start++]) << 16; ret |= (0x00000000000000ffL & data[start++]) << 24; ret |= (0x00000000000000ffL & data[start++]) << 32; ret |= (0x00000000000000ffL & data[start++]) << 40; ret |= (0x00000000000000ffL & data[start++]) << 48; ret |= (0x00000000000000ffL & data[start++]) << 56; return ret; }//from w ww .j a va 2 s . com }