You can't tell how many rows are in a ResultSet or if it is empty. I created my own utility class to do such things. However, it is easy to do the same. The idea would be to put the rows of the ResultSet into an ArrayList. I use that approach and right before returning i convert it to an Object[][] which for most of my needs is more convenient. There is a discussion of this issue here
http://forum.java.sun.com/thread.jspa?threadID=484092&messageID=2262448. I extracted my post and pasted it below.
<<The open source FormattedDataSet has a ResultSetConverter object that converts a ResultSet to an Object[][]. From this you could easily put the array in a collection or just use the array directly.
>>
See the following sites for more info including javadocs, and a live demo.
http://www.fdsapi.com - The easiest way to generate dynamic XML and HTML
http://www.jamonapi.com - A performance tuning API>>