public static int toIntExact (long value)

Returns the value of the long argument; throwing an exception if the value overflows an int.

Parameters:
value    the long value

Returns:  the argument as an int

Exceptions:
ArithmeticException    if the argument overflows an int

Since:  1.8