Here you can find the source of unsignedToBigInteger(long l)
public static BigInteger unsignedToBigInteger(long l)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { private static final BigInteger BI_2_64 = BigInteger.ONE.shiftLeft(64); public static BigInteger unsignedToBigInteger(long l) { final BigInteger bi = BigInteger.valueOf(l); return l >= 0 ? bi : bi.add(BI_2_64); }/*from w ww .j a va 2 s . c om*/ }