Here you can find the source of toLong(byte[] src, int srcPos)
public static long toLong(byte[] src, int srcPos)
//package com.java2s; //License from project: Open Source License 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); }/*w w w. j a v a 2 s.c o m*/ return qword; } public static long toLong(byte[] src) { return toLong(src, 0); } }