Here you can find the source of toLong(byte[] src, int srcPos)
public static long toLong(byte[] src, int srcPos)
//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); }// w ww.java 2 s. co m return qword; } public static long toLong(byte[] src) { return toLong(src, 0); } }