Java tutorial
//package com.java2s; import java.math.BigInteger; public class Main { public static long bytesToLong(byte[] bytes) { return new BigInteger(bytes).longValue(); } }