Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C094217C1D for ; Tue, 11 Nov 2014 14:22:22 +0000 (UTC) Received: (qmail 98229 invoked by uid 500); 11 Nov 2014 14:22:22 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 98148 invoked by uid 500); 11 Nov 2014 14:22:22 -0000 Mailing-List: contact commits-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 commits@commons.apache.org Received: (qmail 98139 invoked by uid 99); 11 Nov 2014 14:22:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 14:22:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2014 14:22:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4CDC023889D5; Tue, 11 Nov 2014 14:21:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1638117 - /commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Date: Tue, 11 Nov 2014 14:21:01 -0000 To: commits@commons.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141111142101.4CDC023889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ggregory Date: Tue Nov 11 14:21:00 2014 New Revision: 1638117 URL: http://svn.apache.org/r1638117 Log: [CSV-139] CSVPrinter.printRecord(ResultSet) with metadata. Modified: commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Modified: commons/proper/csv/trunk/src/site/xdoc/user-guide.xml URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/site/xdoc/user-guide.xml?rev=1638117&r1=1638116&r2=1638117&view=diff ============================================================================== --- commons/proper/csv/trunk/src/site/xdoc/user-guide.xml (original) +++ commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Tue Nov 11 14:21:00 2014 @@ -51,6 +51,18 @@ try { reader.close(); } +
+

+ To print a CSV file with headers, you specify the headers in the format: +

+ final Appendable out = ...; +final CSVPrinter printer = CSVFormat.DEFAULT.withHeader("H1", "H2").print(out) +

+ To print a CSV file with JDBC column labels, you specify the ResultSet in the format: +

+ final ResultSet resultSet = ...; +final CSVPrinter printer = CSVFormat.DEFAULT.withHeader(resultSet).print(out) +