Here you can find the source of asInt(String str)
protected static int asInt(String str)
//package com.java2s; //License from project: Open Source License public class Main { protected static int asInt(String str) { if (str != null && str.length() > 0) try { return Integer.parseInt(str.trim()); } catch (Exception e) { }/*from w ww .j av a 2 s .c o m*/ return 0; } }