Java tutorial
//package com.java2s; public class Main { public static final Long toLong(String value) { try { return new Long(value); } catch (Throwable t) { return null; } } }