Here you can find the source of longFromStringWithoutThrow(String longVal)
public static long longFromStringWithoutThrow(String longVal)
//package com.java2s; //License from project: Open Source License public class Main { public static long longFromStringWithoutThrow(String longVal) { long toReturn = Long.MIN_VALUE; try {// ww w . ja va2s.co m toReturn = Long.parseLong(longVal); } catch (NumberFormatException ignore) { } return toReturn; } }