ColumnInfo colInfo = starTable.getColumnInfo(i);
fields[i] = new VoFieldDesc(colInfo);
}
}
RowSequence rseq = starTable.getRowSequence();
Vector<Vector<Object>> dataVector = new Vector<Vector<Object>>();
int rowCount = 0;
try {
while (rseq.next()) {
if (++rowCount > maxRows) {
break;
}
Object[] rowData = rseq.getRow();
Vector<Object> row = new Vector<Object>(fields.length);
List<Object> list = new ArrayList<Object>(Arrays.asList(rowData));
if (fields.length > numCols) {
list.add(0, rowCount);
}
row.addAll(list);
dataVector.add(row);
}
}
finally {
rseq.close();
}
return new VoTable(starTable, catalog, fields, dataVector, hasRaDecColumn);
}