Here you can find the source of getResultSetStrings(ResultSet rs)
public static String[] getResultSetStrings(ResultSet rs) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.*; public class Main { public static String[] getResultSetStrings(ResultSet rs) throws SQLException { int nCols = getNumberColumns(rs); String[] ret = new String[nCols]; for (int i = 0; i < ret.length; i++) { ret[i] = rs.getString(i + 1); }//from ww w.j ava2 s . c o m return (ret); } public static int getNumberColumns(ResultSet rs) throws SQLException { ResultSetMetaData md = rs.getMetaData(); int nCols = md.getColumnCount(); return (nCols); } }