Here you can find the source of toIntArray(final Object[] array)
public static int[] toIntArray(final Object[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] toIntArray(final Object[] array) { if (array == null) { return new int[0]; }/* www.j av a 2 s . com*/ final int[] retVal = new int[array.length]; try { for (int i = 0; i < array.length; i++) { retVal[i] = Integer.parseInt(String.valueOf(array[i])); } return retVal; } catch (Exception e) { return new int[0]; } } }