Here you can find the source of stringToLongArray(String src, String separator)
public static List<Integer> stringToLongArray(String src, String separator)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static List<Integer> stringToLongArray(String src, String separator) {/*from w w w .ja va 2 s . c om*/ List<Integer> res = new ArrayList<Integer>(); if (src != null && separator != null) { try { String[] strArray = src.split(separator); if (strArray.length > 0) { for (int i = 0; i < strArray.length; i++) { res.add(Integer.parseInt(strArray[i])); } } } catch (Exception e) { } } return res; } }