Java BigInteger Parse getBigInteger(String value)

Here you can find the source of getBigInteger(String value)

Description

Get big integer from a string.

License

Open Source License

Parameter

Parameter Description
value a parameter

Return

big integer instance , or null if numer format exception occurrs.

Declaration

public static BigInteger getBigInteger(String value) 

Method Source Code


//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.math.BigInteger;

public class Main {
    /**//www .  ja  va  2  s.  c o  m
     * Get big integer from a string.
     * 
     * @param value
     * @return big integer instance , or null if numer format exception occurrs.
     */
    public static BigInteger getBigInteger(String value) {
        BigInteger bint = null;
        try {
            bint = new BigInteger(value);
        } catch (NumberFormatException e) {
            return null;
        }
        return bint;
    }
}

Related

  1. getBigInteger(byte[] payload, int offset, int length)
  2. getBigInteger(Console console, Function validator)
  3. getBigInteger(Number number)
  4. getBigInteger(Number value)
  5. getBigIntegerArrayFromByteArray(byte[] buf)
  6. getBigIntegerValue(final Integer value)
  7. getBinaryNumberInString(BigInteger integerNumber)
  8. toBigInteger(String bigInteger)