Here you can find the source of toLong(Object _inStrObj)
public static long toLong(Object _inStrObj)
//package com.java2s; public class Main { public static long toLong(Object _inStrObj) { if (_inStrObj == null || _inStrObj.toString().trim().equals("")) { return 0; } else {//from w w w.ja va 2 s .c om return Long.valueOf(_inStrObj.toString()).longValue(); } } }