Here you can find the source of toInteger(BigInteger integer)
public static Integer toInteger(BigInteger integer)
//package com.java2s; import java.math.BigInteger; public class Main { public static Integer toInteger(BigInteger integer) { if (integer == null) return null; //TODO: no check for overflow return new Integer(integer.intValue()); }//from ww w .j av a2s . c om }