public static ResultSet getAsResultSet(Result result, int numberBlocksPerCall){
DataSourceDataValueIterator dsdvi =
new DataSourceDataValueIterator(result.getDataSource());
dsdvi.setNumBlocksPerCall(numberBlocksPerCall);
Reader reader = new DataValueReader(dsdvi, 1);
WebRowSetToResultSet converter = new WebRowSetToResultSet(reader);
converter.setResultSetType(ResultSet.TYPE_FORWARD_ONLY);
ResultSet rs = null;
try {
rs = converter.getResultSet();