Here you can find the source of intArrayFromString(final String data)
private static int[] intArrayFromString(final String data)
//package com.java2s; public class Main { private static final String CONFIG_EMPTY = "NONE"; private static final String CONFIG_SEPARATOR_ARRAY = ";"; private static int[] intArrayFromString(final String data) { final int[] result; if (data.equals(CONFIG_EMPTY)) { result = null;/* w w w . j a va 2 s . co m*/ } else { final String[] split = data.split(CONFIG_SEPARATOR_ARRAY); result = new int[split.length]; for (int i = 0; i < split.length; i++) { result[i] = Integer.parseInt(split[i].trim()); } } return result; } }