Java Utililty Methods BigInteger From

List of utility methods to do BigInteger From

Description

The list of methods to do BigInteger From are organized into topic(s).

Method

BigIntegertoBigInteger(@Nullable final Boolean value, @Nullable final BigInteger defaultValue)
to Big Integer
return (value == null ? defaultValue : toBigInteger(value.booleanValue()));
BigIntegertoBigInteger(@Nullable final byte[] value)
to Big Integer
return toBigInteger(value, null);
BigIntegerToBigInteger(BitSet bs)
Convert a bitset to a BigInteger.
BigInteger value = BigInteger.ZERO;
for (int i = 0; i < bs.length(); i += 1) {
    if (bs.get(i))
        value = value.setBit(i);
return value;
BigIntegertoBigIntegerFromHex(String val)
Parses 0x representation of the BigInteger from string
BigInteger n = new BigInteger(val.replace("0x", ""), 16);
return n;