public static long exportCSV(final Writer out, final ResultSet rs) throws UncheckedSQLException, UncheckedIOException {
        return exportCSV(out, rs, 0, Long.MAX_VALUE, true, true);
    }
public static long exportCSV ( final Writer out , final ResultSet rs ) throws UncheckedSQLException , UncheckedIOException { return exportCSV ( out , rs , 0 , Long . MAX_VALUE , true , true ) ; }
Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.

@param out
@param rs
@return