Here you can find the source of toLong(byte[] src)
public static long toLong(byte[] src)
//package com.java2s; public class Main { public static long toLong(byte[] src, int srcPos) { long qword = 0; for (int i = 0; i < 8; i++) { qword = (qword << 8) + (src[i + srcPos] & 0xFF); }/*from w ww. jav a 2s . c om*/ return qword; } public static long toLong(byte[] src) { return toLong(src, 0); } }