Here you can find the source of asInt(String str)
private static int asInt(String str)
//package com.java2s; //License from project: LGPL public class Main { private static int asInt(String str) { try {//from w w w .ja v a 2 s . co m return Integer.valueOf(str); } catch (NumberFormatException nfex) { return Integer.MIN_VALUE; } } }