Here you can find the source of toIntArray(Integer[] data)
public static int[] toIntArray(Integer[] data)
//package com.java2s; public class Main { public static int[] toIntArray(Integer[] data) { int[] r = new int[data.length]; for (int i = 0; i < data.length; i++) r[i] = data[i].intValue();/*from w w w . j av a 2s . c o m*/ return r; } }