Here you can find the source of getIntegers(ResultSet rs, String column)
public static List<Integer> getIntegers(ResultSet rs, String column) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.*; import java.util.*; import java.util.stream.*; import static java.util.Arrays.*; import static java.util.stream.Collectors.*; public class Main { public static List<Integer> getIntegers(ResultSet rs, String column) throws SQLException { Object array = rs.getArray(column).getArray(); if (array instanceof Integer[]) return asList((Integer[]) array); else if (array instanceof Number[]) return Stream.of((Number[]) array).map(Number::intValue).collect(toList()); else// w w w.j a v a 2 s . com throw new IllegalArgumentException("Incompatible type with Integer[]: " + array.getClass()); } }