Here you can find the source of toBigInteger(Object value)
public static BigInteger toBigInteger(Object value)
//package com.java2s; //License from project: Apache License import java.math.BigInteger; public class Main { /**//from www. j a v a 2s. co m * Convert an Object to a BigInteger. */ public static BigInteger toBigInteger(Object value) { if (value == null) return null; if (value instanceof BigInteger) return (BigInteger) value; if (value instanceof String) { if ("".equals((String) value)) return null; return new BigInteger((String) value); } return new BigInteger(value.toString()); } }