Here you can find the source of long2Int(final long v)
static int long2Int(final long v)
//package com.java2s; public class Main { static final long MAX_INT_VALUE = (Integer.MAX_VALUE & 0xffffffffL); static int long2Int(final long v) { if (MAX_INT_VALUE < v) { throw new IllegalArgumentException( "Read uint32 value " + toHexString(v) + " > int32-max " + toHexString(MAX_INT_VALUE)); }//from www . java 2 s. c om return (int) v; } static String toHexString(final int i) { return "0x" + Integer.toHexString(i); } static String toHexString(final long i) { return "0x" + Long.toHexString(i); } }