Here you can find the source of toLong(String tStr)
public static long toLong(String tStr)
//package com.java2s; public class Main { public static long toLong(String tStr) { try {// w w w . ja v a 2 s .co m return Long.parseLong(tStr); } catch (Exception e) { return -1; } } }