Here you can find the source of longFromString(String which, String s)
private static long longFromString(String which, String s)
//package com.java2s; //License from project: Open Source License public class Main { private static long longFromString(String which, String s) { try {/*from w w w .jav a 2s. co m*/ return Long.parseLong(s); } catch (NumberFormatException e) { throw new IllegalArgumentException(String.format( "%s must be an integer", which), e); } } }