Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B1E78200B52 for ; Sun, 10 Jul 2016 21:38:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B0201160A66; Sun, 10 Jul 2016 19:38:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 97E73160A69 for ; Sun, 10 Jul 2016 21:38:33 +0200 (CEST) Received: (qmail 34716 invoked by uid 500); 10 Jul 2016 19:38:32 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 34706 invoked by uid 99); 10 Jul 2016 19:38:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2016 19:38:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 23F03C043F for ; Sun, 10 Jul 2016 19:38:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.713 X-Spam-Level: * X-Spam-Status: No, score=1.713 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LINEPADDING=1.2, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uIV2tkmEY2br for ; Sun, 10 Jul 2016 19:38:27 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id BB4C05FB36 for ; Sun, 10 Jul 2016 19:38:26 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7DA57E6369 for ; Sun, 10 Jul 2016 19:38:24 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D3C623A293D for ; Sun, 10 Jul 2016 19:38:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r992480 [14/46] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apidocs/src-html/org/apache/commons/csv/ css/ jacoco/ jac... Date: Sun, 10 Jul 2016 19:38:21 -0000 To: notifications@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160710193823.D3C623A293D@svn01-us-west.apache.org> archived-at: Sun, 10 Jul 2016 19:38:35 -0000 Modified: websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVPrinter.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVPrinter.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVPrinter.html Sun Jul 10 19:38:20 2016 @@ -1,413 +1,413 @@ - - - -Source code - - - -
-
001/*
-002 * Licensed to the Apache Software Foundation (ASF) under one or more
-003 * contributor license agreements.  See the NOTICE file distributed with
-004 * this work for additional information regarding copyright ownership.
-005 * The ASF licenses this file to You under the Apache License, Version 2.0
-006 * (the "License"); you may not use this file except in compliance with
-007 * the License.  You may obtain a copy of the License at
-008 *
-009 *      http://www.apache.org/licenses/LICENSE-2.0
-010 *
-011 * Unless required by applicable law or agreed to in writing, software
-012 * distributed under the License is distributed on an "AS IS" BASIS,
-013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-014 * See the License for the specific language governing permissions and
-015 * limitations under the License.
-016 */
-017
-018package org.apache.commons.csv;
-019
-020import static org.apache.commons.csv.Constants.CR;
-021import static org.apache.commons.csv.Constants.LF;
-022import static org.apache.commons.csv.Constants.SP;
-023
-024import java.io.Closeable;
-025import java.io.Flushable;
-026import java.io.IOException;
-027import java.sql.ResultSet;
-028import java.sql.SQLException;
-029
-030/**
-031 * Prints values in a CSV format.
-032 *
-033 * @version $Id: CSVPrinter.java 1743430 2016-05-11 21:09:48Z ggregory $
-034 */
-035public final class CSVPrinter implements Flushable, Closeable {
-036
-037    /** The place that the values get written. */
-038    private final Appendable out;
-039    private final CSVFormat format;
-040
-041    /** True if we just began a new record. */
-042    private boolean newRecord = true;
-043
-044    /**
-045     * Creates a printer that will print values to the given stream following the CSVFormat.
-046     * <p>
-047     * Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation
-048     * and escaping with a different character) are not supported.
-049     * </p>
-050     *
-051     * @param out
-052     *            stream to which to print. Must not be null.
-053     * @param format
-054     *            the CSV format. Must not be null.
-055     * @throws IOException
-056     *             thrown if the optional header cannot be printed.
-057     * @throws IllegalArgumentException
-058     *             thrown if the parameters of the format are inconsistent or if either out or format are null.
-059     */
-060    public CSVPrinter(final Appendable out, final CSVFormat format) throws IOException {
-061        Assertions.notNull(out, "out");
-062        Assertions.notNull(format, "format");
-063
-064        this.out = out;
-065        this.format = format;
-066        // TODO: Is it a good idea to do this here instead of on the first call to a print method?
-067        // It seems a pain to have to track whether the header has already been printed or not.
-068        if (format.getHeaderComments() != null) {
-069            for (final String line : format.getHeaderComments()) {
-070                if (line != null) {
-071                    this.printComment(line);
-072                }
-073            }
-074        }
-075        if (format.getHeader() != null && !format.getSkipHeaderRecord()) {
-076            this.printRecord((Object[]) format.getHeader());
-077        }
-078    }
-079
-080    // ======================================================
-081    // printing implementation
-082    // ======================================================
-083
-084    @Override
-085    public void close() throws IOException {
-086        if (out instanceof Closeable) {
-087            ((Closeable) out).close();
-088        }
-089    }
-090
-091    /**
-092     * Flushes the underlying stream.
-093     *
-094     * @throws IOException
-095     *             If an I/O error occurs
-096     */
-097    @Override
-098    public void flush() throws IOException {
-099        if (out instanceof Flushable) {
-100            ((Flushable) out).flush();
-101        }
-102    }
-103
-104    /**
-105     * Gets the target Appendable.
-106     *
-107     * @return the target Appendable.
-108     */
-109    public Appendable getOut() {
-110        return this.out;
-111    }
-112
-113    /**
-114     * Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.
-115     *
-116     * @param value
-117     *            value to be output.
-118     * @throws IOException
-119     *             If an I/O error occurs
-120     */
-121    public void print(final Object value) throws IOException {
-122        format.print(value, out, newRecord);
-123        newRecord = false;
-124    }
-125
-126    /**
-127     * Prints a comment on a new line among the delimiter separated values.
-128     *
-129     * <p>
-130     * Comments will always begin on a new line and occupy a least one full line. The character specified to start
-131     * comments and a space will be inserted at the beginning of each new line in the comment.
-132     * </p>
-133     *
-134     * If comments are disabled in the current CSV format this method does nothing.
-135     *
-136     * @param comment
-137     *            the comment to output
-138     * @throws IOException
-139     *             If an I/O error occurs
-140     */
-141    public void printComment(final String comment) throws IOException {
-142        if (!format.isCommentMarkerSet()) {
-143            return;
-144        }
-145        if (!newRecord) {
-146            println();
-147        }
-148        out.append(format.getCommentMarker().charValue());
-149        out.append(SP);
-150        for (int i = 0; i < comment.length(); i++) {
-151            final char c = comment.charAt(i);
-152            switch (c) {
-153            case CR:
-154                if (i + 1 < comment.length() && comment.charAt(i + 1) == LF) {
-155                    i++;
-156                }
-157                //$FALL-THROUGH$ break intentionally excluded.
-158            case LF:
-159                println();
-160                out.append(format.getCommentMarker().charValue());
-161                out.append(SP);
-162                break;
-163            default:
-164                out.append(c);
-165                break;
-166            }
-167        }
-168        println();
-169    }
-170
-171    /**
-172     * Outputs the record separator.
-173     *
-174     * @throws IOException
-175     *             If an I/O error occurs
-176     */
-177    public void println() throws IOException {
-178        format.println(out);
-179        newRecord = true;
-180    }
-181
-182    /**
-183     * Prints the given values a single record of delimiter separated values followed by the record separator.
-184     *
-185     * <p>
-186     * The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record
-187     * separator to the output after printing the record, so there is no need to call {@link #println()}.
-188     * </p>
-189     *
-190     * @param values
-191     *            values to output.
-192     * @throws IOException
-193     *             If an I/O error occurs
-194     */
-195    public void printRecord(final Iterable<?> values) throws IOException {
-196        for (final Object value : values) {
-197            print(value);
-198        }
-199        println();
-200    }
-201
-202    /**
-203     * Prints the given values a single record of delimiter separated values followed by the record separator.
-204     *
-205     * <p>
-206     * The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record
-207     * separator to the output after printing the record, so there is no need to call {@link #println()}.
-208     * </p>
-209     *
-210     * @param values
-211     *            values to output.
-212     * @throws IOException
-213     *             If an I/O error occurs
-214     */
-215    public void printRecord(final Object... values) throws IOException {
-216        format.printRecord(out, values);
-217        newRecord = true;
-218    }
-219
-220    /**
-221     * Prints all the objects in the given collection handling nested collections/arrays as records.
-222     *
-223     * <p>
-224     * If the given collection only contains simple objects, this method will print a single record like
-225     * {@link #printRecord(Iterable)}. If the given collections contains nested collections/arrays those nested elements
-226     * will each be printed as records using {@link #printRecord(Object...)}.
-227     * </p>
-228     *
-229     * <p>
-230     * Given the following data structure:
-231     * </p>
-232     *
-233     * <pre>
-234     * <code>
-235     * List&lt;String[]&gt; data = ...
-236     * data.add(new String[]{ "A", "B", "C" });
-237     * data.add(new String[]{ "1", "2", "3" });
-238     * data.add(new String[]{ "A1", "B2", "C3" });
-239     * </code>
-240     * </pre>
-241     *
-242     * <p>
-243     * Calling this method will print:
-244     * </p>
-245     *
-246     * <pre>
-247     * <code>
-248     * A, B, C
-249     * 1, 2, 3
-250     * A1, B2, C3
-251     * </code>
-252     * </pre>
-253     *
-254     * @param values
-255     *            the values to print.
-256     * @throws IOException
-257     *             If an I/O error occurs
-258     */
-259    public void printRecords(final Iterable<?> values) throws IOException {
-260        for (final Object value : values) {
-261            if (value instanceof Object[]) {
-262                this.printRecord((Object[]) value);
-263            } else if (value instanceof Iterable) {
-264                this.printRecord((Iterable<?>) value);
-265            } else {
-266                this.printRecord(value);
-267            }
-268        }
-269    }
-270
-271    /**
-272     * Prints all the objects in the given array handling nested collections/arrays as records.
-273     *
-274     * <p>
-275     * If the given array only contains simple objects, this method will print a single record like
-276     * {@link #printRecord(Object...)}. If the given collections contains nested collections/arrays those nested
-277     * elements will each be printed as records using {@link #printRecord(Object...)}.
-278     * </p>
-279     *
-280     * <p>
-281     * Given the following data structure:
-282     * </p>
-283     *
-284     * <pre>
-285     * <code>
-286     * String[][] data = new String[3][]
-287     * data[0] = String[]{ "A", "B", "C" };
-288     * data[1] = new String[]{ "1", "2", "3" };
-289     * data[2] = new String[]{ "A1", "B2", "C3" };
-290     * </code>
-291     * </pre>
-292     *
-293     * <p>
-294     * Calling this method will print:
-295     * </p>
-296     *
-297     * <pre>
-298     * <code>
-299     * A, B, C
-300     * 1, 2, 3
-301     * A1, B2, C3
-302     * </code>
-303     * </pre>
-304     *
-305     * @param values
-306     *            the values to print.
-307     * @throws IOException
-308     *             If an I/O error occurs
-309     */
-310    public void printRecords(final Object... values) throws IOException {
-311        for (final Object value : values) {
-312            if (value instanceof Object[]) {
-313                this.printRecord((Object[]) value);
-314            } else if (value instanceof Iterable) {
-315                this.printRecord((Iterable<?>) value);
-316            } else {
-317                this.printRecord(value);
-318            }
-319        }
-320    }
-321
-322    /**
-323     * Prints all the objects in the given JDBC result set.
-324     *
-325     * @param resultSet
-326     *            result set the values to print.
-327     * @throws IOException
-328     *             If an I/O error occurs
-329     * @throws SQLException
-330     *             if a database access error occurs
-331     */
-332    public void printRecords(final ResultSet resultSet) throws SQLException, IOException {
-333        final int columnCount = resultSet.getMetaData().getColumnCount();
-334        while (resultSet.next()) {
-335            for (int i = 1; i <= columnCount; i++) {
-336                print(resultSet.getObject(i));
-337            }
-338            println();
-339        }
-340    }
-341}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- + + + +Source code + + + +
+
001/*
+002 * Licensed to the Apache Software Foundation (ASF) under one or more
+003 * contributor license agreements.  See the NOTICE file distributed with
+004 * this work for additional information regarding copyright ownership.
+005 * The ASF licenses this file to You under the Apache License, Version 2.0
+006 * (the "License"); you may not use this file except in compliance with
+007 * the License.  You may obtain a copy of the License at
+008 *
+009 *      http://www.apache.org/licenses/LICENSE-2.0
+010 *
+011 * Unless required by applicable law or agreed to in writing, software
+012 * distributed under the License is distributed on an "AS IS" BASIS,
+013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+014 * See the License for the specific language governing permissions and
+015 * limitations under the License.
+016 */
+017
+018package org.apache.commons.csv;
+019
+020import static org.apache.commons.csv.Constants.CR;
+021import static org.apache.commons.csv.Constants.LF;
+022import static org.apache.commons.csv.Constants.SP;
+023
+024import java.io.Closeable;
+025import java.io.Flushable;
+026import java.io.IOException;
+027import java.sql.ResultSet;
+028import java.sql.SQLException;
+029
+030/**
+031 * Prints values in a CSV format.
+032 *
+033 * @version $Id$
+034 */
+035public final class CSVPrinter implements Flushable, Closeable {
+036
+037    /** The place that the values get written. */
+038    private final Appendable out;
+039    private final CSVFormat format;
+040
+041    /** True if we just began a new record. */
+042    private boolean newRecord = true;
+043
+044    /**
+045     * Creates a printer that will print values to the given stream following the CSVFormat.
+046     * <p>
+047     * Currently, only a pure encapsulation format or a pure escaping format is supported. Hybrid formats (encapsulation
+048     * and escaping with a different character) are not supported.
+049     * </p>
+050     *
+051     * @param out
+052     *            stream to which to print. Must not be null.
+053     * @param format
+054     *            the CSV format. Must not be null.
+055     * @throws IOException
+056     *             thrown if the optional header cannot be printed.
+057     * @throws IllegalArgumentException
+058     *             thrown if the parameters of the format are inconsistent or if either out or format are null.
+059     */
+060    public CSVPrinter(final Appendable out, final CSVFormat format) throws IOException {
+061        Assertions.notNull(out, "out");
+062        Assertions.notNull(format, "format");
+063
+064        this.out = out;
+065        this.format = format;
+066        // TODO: Is it a good idea to do this here instead of on the first call to a print method?
+067        // It seems a pain to have to track whether the header has already been printed or not.
+068        if (format.getHeaderComments() != null) {
+069            for (final String line : format.getHeaderComments()) {
+070                if (line != null) {
+071                    this.printComment(line);
+072                }
+073            }
+074        }
+075        if (format.getHeader() != null && !format.getSkipHeaderRecord()) {
+076            this.printRecord((Object[]) format.getHeader());
+077        }
+078    }
+079
+080    // ======================================================
+081    // printing implementation
+082    // ======================================================
+083
+084    @Override
+085    public void close() throws IOException {
+086        if (out instanceof Closeable) {
+087            ((Closeable) out).close();
+088        }
+089    }
+090
+091    /**
+092     * Flushes the underlying stream.
+093     *
+094     * @throws IOException
+095     *             If an I/O error occurs
+096     */
+097    @Override
+098    public void flush() throws IOException {
+099        if (out instanceof Flushable) {
+100            ((Flushable) out).flush();
+101        }
+102    }
+103
+104    /**
+105     * Gets the target Appendable.
+106     *
+107     * @return the target Appendable.
+108     */
+109    public Appendable getOut() {
+110        return this.out;
+111    }
+112
+113    /**
+114     * Prints the string as the next value on the line. The value will be escaped or encapsulated as needed.
+115     *
+116     * @param value
+117     *            value to be output.
+118     * @throws IOException
+119     *             If an I/O error occurs
+120     */
+121    public void print(final Object value) throws IOException {
+122        format.print(value, out, newRecord);
+123        newRecord = false;
+124    }
+125
+126    /**
+127     * Prints a comment on a new line among the delimiter separated values.
+128     *
+129     * <p>
+130     * Comments will always begin on a new line and occupy a least one full line. The character specified to start
+131     * comments and a space will be inserted at the beginning of each new line in the comment.
+132     * </p>
+133     *
+134     * If comments are disabled in the current CSV format this method does nothing.
+135     *
+136     * @param comment
+137     *            the comment to output
+138     * @throws IOException
+139     *             If an I/O error occurs
+140     */
+141    public void printComment(final String comment) throws IOException {
+142        if (!format.isCommentMarkerSet()) {
+143            return;
+144        }
+145        if (!newRecord) {
+146            println();
+147        }
+148        out.append(format.getCommentMarker().charValue());
+149        out.append(SP);
+150        for (int i = 0; i < comment.length(); i++) {
+151            final char c = comment.charAt(i);
+152            switch (c) {
+153            case CR:
+154                if (i + 1 < comment.length() && comment.charAt(i + 1) == LF) {
+155                    i++;
+156                }
+157                //$FALL-THROUGH$ break intentionally excluded.
+158            case LF:
+159                println();
+160                out.append(format.getCommentMarker().charValue());
+161                out.append(SP);
+162                break;
+163            default:
+164                out.append(c);
+165                break;
+166            }
+167        }
+168        println();
+169    }
+170
+171    /**
+172     * Outputs the record separator.
+173     *
+174     * @throws IOException
+175     *             If an I/O error occurs
+176     */
+177    public void println() throws IOException {
+178        format.println(out);
+179        newRecord = true;
+180    }
+181
+182    /**
+183     * Prints the given values a single record of delimiter separated values followed by the record separator.
+184     *
+185     * <p>
+186     * The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record
+187     * separator to the output after printing the record, so there is no need to call {@link #println()}.
+188     * </p>
+189     *
+190     * @param values
+191     *            values to output.
+192     * @throws IOException
+193     *             If an I/O error occurs
+194     */
+195    public void printRecord(final Iterable<?> values) throws IOException {
+196        for (final Object value : values) {
+197            print(value);
+198        }
+199        println();
+200    }
+201
+202    /**
+203     * Prints the given values a single record of delimiter separated values followed by the record separator.
+204     *
+205     * <p>
+206     * The values will be quoted if needed. Quotes and newLine characters will be escaped. This method adds the record
+207     * separator to the output after printing the record, so there is no need to call {@link #println()}.
+208     * </p>
+209     *
+210     * @param values
+211     *            values to output.
+212     * @throws IOException
+213     *             If an I/O error occurs
+214     */
+215    public void printRecord(final Object... values) throws IOException {
+216        format.printRecord(out, values);
+217        newRecord = true;
+218    }
+219
+220    /**
+221     * Prints all the objects in the given collection handling nested collections/arrays as records.
+222     *
+223     * <p>
+224     * If the given collection only contains simple objects, this method will print a single record like
+225     * {@link #printRecord(Iterable)}. If the given collections contains nested collections/arrays those nested elements
+226     * will each be printed as records using {@link #printRecord(Object...)}.
+227     * </p>
+228     *
+229     * <p>
+230     * Given the following data structure:
+231     * </p>
+232     *
+233     * <pre>
+234     * <code>
+235     * List&lt;String[]&gt; data = ...
+236     * data.add(new String[]{ "A", "B", "C" });
+237     * data.add(new String[]{ "1", "2", "3" });
+238     * data.add(new String[]{ "A1", "B2", "C3" });
+239     * </code>
+240     * </pre>
+241     *
+242     * <p>
+243     * Calling this method will print:
+244     * </p>
+245     *
+246     * <pre>
+247     * <code>
+248     * A, B, C
+249     * 1, 2, 3
+250     * A1, B2, C3
+251     * </code>
+252     * </pre>
+253     *
+254     * @param values
+255     *            the values to print.
+256     * @throws IOException
+257     *             If an I/O error occurs
+258     */
+259    public void printRecords(final Iterable<?> values) throws IOException {
+260        for (final Object value : values) {
+261            if (value instanceof Object[]) {
+262                this.printRecord((Object[]) value);
+263            } else if (value instanceof Iterable) {
+264                this.printRecord((Iterable<?>) value);
+265            } else {
+266                this.printRecord(value);
+267            }
+268        }
+269    }
+270
+271    /**
+272     * Prints all the objects in the given array handling nested collections/arrays as records.
+273     *
+274     * <p>
+275     * If the given array only contains simple objects, this method will print a single record like
+276     * {@link #printRecord(Object...)}. If the given collections contains nested collections/arrays those nested
+277     * elements will each be printed as records using {@link #printRecord(Object...)}.
+278     * </p>
+279     *
+280     * <p>
+281     * Given the following data structure:
+282     * </p>
+283     *
+284     * <pre>
+285     * <code>
+286     * String[][] data = new String[3][]
+287     * data[0] = String[]{ "A", "B", "C" };
+288     * data[1] = new String[]{ "1", "2", "3" };
+289     * data[2] = new String[]{ "A1", "B2", "C3" };
+290     * </code>
+291     * </pre>
+292     *
+293     * <p>
+294     * Calling this method will print:
+295     * </p>
+296     *
+297     * <pre>
+298     * <code>
+299     * A, B, C
+300     * 1, 2, 3
+301     * A1, B2, C3
+302     * </code>
+303     * </pre>
+304     *
+305     * @param values
+306     *            the values to print.
+307     * @throws IOException
+308     *             If an I/O error occurs
+309     */
+310    public void printRecords(final Object... values) throws IOException {
+311        for (final Object value : values) {
+312            if (value instanceof Object[]) {
+313                this.printRecord((Object[]) value);
+314            } else if (value instanceof Iterable) {
+315                this.printRecord((Iterable<?>) value);
+316            } else {
+317                this.printRecord(value);
+318            }
+319        }
+320    }
+321
+322    /**
+323     * Prints all the objects in the given JDBC result set.
+324     *
+325     * @param resultSet
+326     *            result set the values to print.
+327     * @throws IOException
+328     *             If an I/O error occurs
+329     * @throws SQLException
+330     *             if a database access error occurs
+331     */
+332    public void printRecords(final ResultSet resultSet) throws SQLException, IOException {
+333        final int columnCount = resultSet.getMetaData().getColumnCount();
+334        while (resultSet.next()) {
+335            for (int i = 1; i <= columnCount; i++) {
+336                print(resultSet.getObject(i));
+337            }
+338            println();
+339        }
+340    }
+341}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \ No newline at end of file Modified: websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVRecord.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVRecord.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/CSVRecord.html Sun Jul 10 19:38:20 2016 @@ -1,5 +1,5 @@ - + Source code Modified: websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/QuoteMode.html ============================================================================== --- websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/QuoteMode.html (original) +++ websites/production/commons/content/proper/commons-csv/apidocs/src-html/org/apache/commons/csv/QuoteMode.html Sun Jul 10 19:38:20 2016 @@ -1,5 +1,5 @@ - + Source code @@ -27,7 +27,7 @@ 019/** 020 * Defines quote behavior when printing. 021 * -022 * @version $Id: QuoteMode.java 1694977 2015-08-10 07:05:58Z ggregory $ +022 * @version $Id$ 023 */ 024public enum QuoteMode { 025