Here you can find the source of valueOfStringToLong(String[] values)
public static long[] valueOfStringToLong(String[] values)
//package com.java2s; public class Main { public static long[] valueOfStringToLong(String[] values) { if (null == values) { return new long[0]; }/*from w ww .j a v a 2 s.c o m*/ long reValue[] = new long[values.length]; for (int i = 0; i < values.length; i++) { try { reValue[i] = Long.parseLong(values[i]); } catch (Exception e) { reValue[i] = -1; } } return reValue; } }