Have you tried the constructor BigIntegerwith string and radius ?
BigInteger value = new BigInteger(hex, 16);
Code example:
import java.math.BigInteger;
public class Test {
public static void main(String[] args) {
String hex = "3132333435363738396162636465666768696a6b6c6d6e6f70";
BigInteger number = new BigInteger(hex , 16);
System.out.println(number);
}
}
Conclusion:
308808885829455478403317837970537433512288994552567292653424
source
share