Here you can find the source of toInt32(long x)
public static int toInt32(long x)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt32(long x) { if ((int) x == x) { return (int) x; }//from w w w. j a va2s. c om throw new IllegalArgumentException("Int " + x + " out of range"); } }