Here you can find the source of parseCSLongs(String s)
public static long[] parseCSLongs(String s)
//package com.java2s; public class Main { public static long[] parseCSLongs(String s) { if (s == null) { return null; }/*from w w w . ja va 2s. co m*/ String[] elements = s.split(","); long[] result = new long[elements.length]; for (int index = 0; index < elements.length; index++) { Long value = parseLong(elements[index]); if (value != null) { result[index] = value; } else { return null; } } return result; } public static Long parseLong(String s) { try { return new Long(s); } catch (NumberFormatException e) { return null; } } }