Here you can find the source of readUInt64(ByteBuffer bb)
public static BigInteger readUInt64(ByteBuffer bb)
//package com.java2s; //License from project: LGPL import java.math.BigInteger; import java.nio.ByteBuffer; public class Main { public static BigInteger readUInt64(ByteBuffer bb) { byte[] data = new byte[8]; bb.get(data);/*from w w w . ja v a 2 s.co m*/ long l1 = (((long) data[0] & 0xff) << 0) | (((long) data[1] & 0xff) << 8) | (((long) data[2] & 0xff) << 16) | (((long) data[3] & 0xff) << 24); long l2 = (((long) data[4] & 0xff) << 0) | (((long) data[5] & 0xff) << 8) | (((long) data[6] & 0xff) << 16) | (((long) data[7] & 0xff) << 24); return BigInteger.valueOf((l1 << 0) | (l2 << 32)); } }