Here you can find the source of toLong(String str, long val)
public static long toLong(String str, long val)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static long toLong(String str) { return Long.parseLong(str); }/* www. ja v a 2s . com*/ public static long toLong(String str, long val) { return str != null ? Long.parseLong(str) : val; } }