Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 266539E96 for ; Sun, 15 Apr 2012 22:53:38 +0000 (UTC) Received: (qmail 9078 invoked by uid 500); 15 Apr 2012 22:53:37 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8984 invoked by uid 500); 15 Apr 2012 22:53:37 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 8975 invoked by uid 99); 15 Apr 2012 22:53:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 22:53:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Apr 2012 22:53:36 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A666236C97C for ; Sun, 15 Apr 2012 22:53:16 +0000 (UTC) Date: Sun, 15 Apr 2012 22:53:16 +0000 (UTC) From: "Vishal Bhavsar (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <1643523661.27178.1334530396694.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2008049077.35162.1333055968014.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (IO-317) Need a way to extract parsed headers, e.g. for use in formatting output MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IO-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254451#comment-13254451 ] Vishal Bhavsar commented on IO-317: ----------------------------------- Why not use CSVParser.getRecords()[0] to get the header array? > Need a way to extract parsed headers, e.g. for use in formatting output > ----------------------------------------------------------------------- > > Key: IO-317 > URL: https://issues.apache.org/jira/browse/IO-317 > Project: Commons IO > Issue Type: New Feature > Reporter: Sebb > > Parsed header names are currently not accessible except as field key names, but these have to be known in advance. > It would be useful to be able to have access to the header names: > * to use in printing a header for a new CSV file. E.g. to read a CSV file and produce a new one with some changes made. > * to write generic CSV applications > The headers could be made available as a String array (in column number order) from the CSVParser class. > The simplest would be to store the parsed (or provided) headers and return a clone of the array. > If headers were not provided or requested, the method should probably return null rather than an empty array - to be decided. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira