in src/main/java/org/apache/commons/csv/CSVPrinter.java [417:427]
public void printRecords(final ResultSet resultSet) throws SQLException, IOException {
final int columnCount = resultSet.getMetaData().getColumnCount();
while (resultSet.next()) {
for (int i = 1; i <= columnCount; i++) {
final Object object = resultSet.getObject(i);
// TODO Who manages the Clob? The JDBC driver or must we close it? Is it driver-dependent?
print(object instanceof Clob ? ((Clob) object).getCharacterStream() : object);
}
println();
}
}