Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 80007 invoked from network); 14 Jul 2004 21:25:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jul 2004 21:25:12 -0000 Received: (qmail 38522 invoked by uid 500); 14 Jul 2004 21:25:09 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 38346 invoked by uid 500); 14 Jul 2004 21:25:08 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 38196 invoked by uid 99); 14 Jul 2004 21:25:07 -0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received: from [217.12.12.199] (HELO smtp809.mail.ukl.yahoo.com) (217.12.12.199) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 14 Jul 2004 14:25:02 -0700 Received: from unknown (HELO oemcomputer) (commons-dev@jakarta.apache.org@81.154.64.192 with poptime) by smtp809.mail.ukl.yahoo.com with SMTP; 14 Jul 2004 21:25:00 -0000 Message-ID: <006901c469e9$35279720$c0409a51@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: Subject: Re: [io][collections/iterators] a line by line iterator from an input stream? Date: Wed, 14 Jul 2004 22:26:20 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N There is no iterator as you describe at present. I have plans in my head to add more read methods to io including FileUtils.readToByteArray(File) FileUtils.readLinesToStringList(File) FileUtils.readLinesToStringArray(File) However, an iterator to achieve the lines approach would also be a useful addition for larger files. If you create one, with apache licence and tests, please attach it to a bugzilla enhancement report and we can try to include it in v1.1. Stephen ----- Original Message ----- From: > not sure if this is better directed at the io commons, or at > collections/iterators. > > i'd like to iterate through the lines of an input stream (ala > BufferedReader.readLine()), and i was hoping that there was an iterator > in commons collections or io to do this, but there doesn't seem to be. > is there a historical reason for this, or is it just a matter of > someone putting one together and asking for people to consider it? > > if there are previous discussions of this i should see, please point > them out. i tried searching the archives for 'file line iterator', > 'StreamIterator', 'FileIterator', and 'input stream iterator', and > didn't get anything which really told me one way or the other why this > iterator isn't yet present, but it's kind of a hard thing to search for > i guess. > > jon > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org