Here you can find the source of toInt4Trim(String value, int _default)
public static int toInt4Trim(String value, int _default)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt4Trim(String value, int _default) { if (value == null || value.trim().length() == 0) return _default; try {/* www . ja va 2 s. c o m*/ return Integer.valueOf(value); } catch (Exception e) { e.printStackTrace(); } return _default; } }