Here you can find the source of intValueExact(BigInteger bigint)
public static int intValueExact(BigInteger bigint)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { public static int intValueExact(BigInteger bigint) { if (bigint == null || bigint.bitLength() > 31) { throw new ArithmeticException(); }//from www. j a va 2s . c om return bigint.intValue(); } }