Here you can find the source of convertStringToInteger(String string)
private static Integer convertStringToInteger(String string)
//package com.java2s; //License from project: Open Source License public class Main { private static Integer convertStringToInteger(String string) { if (string == null) { return null; }// w w w. j a v a 2s . c om try { Integer integer = Integer.parseInt(string.trim()); return integer; } catch (NumberFormatException e) { return null; } } }