public void writeAll(ResultSet rs,boolean includeColumnNames) throws SQLException, IOException {
  if (includeColumnNames) {
    writeColumnNames(rs);
  }
  while (rs.next()) {
    writeNext(resultService.getColumnValues(rs));
  }
}

public void writeAll ( ResultSet rs , boolean includeColumnNames ) throws SQLException , IOException { if ( includeColumnNames ) { writeColumnNames ( rs ) ; } while ( rs . next ( ) ) { writeNext ( resultService . getColumnValues ( rs ) ) ; } }
writes the entire resultset to a csv file . the caller is responsible for closing the resultset .
