Here you can find the source of longToInt(long d)
public static int longToInt(long d)
//package com.java2s; //License from project: Apache License public class Main { public static int longToInt(long d) { int lo = 0; try {//from w ww .j a va2 s . co m lo = Integer.parseInt(String.valueOf(d)); } catch (Exception e) { lo = 0; } return lo; } }