Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 6096 invoked from network); 26 Oct 2007 05:48:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 05:48:03 -0000 Received: (qmail 82024 invoked by uid 500); 26 Oct 2007 05:47:50 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 81936 invoked by uid 500); 26 Oct 2007 05:47:49 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 81927 invoked by uid 99); 26 Oct 2007 05:47:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 22:47:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hanson.char@gmail.com designates 66.249.82.232 as permitted sender) Received: from [66.249.82.232] (HELO wx-out-0506.google.com) (66.249.82.232) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 05:47:53 +0000 Received: by wx-out-0506.google.com with SMTP id h29so691089wxd for ; Thu, 25 Oct 2007 22:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=xt4469Y5Y7D4WlKk5q2Rg5Zd+rhoU8rd8K8Jl3OMzCc=; b=MUgIjzfTfdQJQ8sIj18pBt70bwgTBD6HPpqZ+RA+nNxRD18lB0CJACqZRiYVqbj+WFixis0YGCzjIzflYtV6S31QbTV0qJWz1o48n9bj+AS0rNyusvpWnmEdaT4fLpg9gVrJF0Ucp4G1jun+cKiKERdD8qZvBKla6V4N4waprgI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GoiCnP1IdIhKry+67If5M15k5dFSzPyk9Nh/iRvDD6dUQAotCKRYIBVwwDUkZa4kUQmVsQqAezRS/wI90Bv08pz4+TSPUqkEVZ2W8yHXXTLPH0LVSVPJ8LOuxGvB6QChA8IGah327F2ixjZ/nJC/r0qioJvmymWhZevt0HmDcFg= Received: by 10.90.71.3 with SMTP id t3mr2179301aga.1193377651999; Thu, 25 Oct 2007 22:47:31 -0700 (PDT) Received: by 10.90.69.14 with HTTP; Thu, 25 Oct 2007 22:47:31 -0700 (PDT) Message-ID: Date: Thu, 25 Oct 2007 22:47:31 -0700 From: "Hanson Char" To: "Jakarta Commons Developers List" Subject: Re: TextIterable ? In-Reply-To: <31cc37360710252239i1c3683c6pf28014053ef74890@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <31cc37360710251919i46e69dc1pba41dd75f2ebf9e2@mail.gmail.com> <31cc37360710252239i1c3683c6pf28014053ef74890@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org > a) I hate APIs that force me to think in terms of File/URL and not in > term of streams. It's like not having piping in unix. Well then you would certainly hate TextIterable, for it is intentionally designed to operate at a higher level ie File, Resource, URL. No streams. Just iterate. As a client of TextIterable, I'd like to play lazy and have simple/minimal code that just works for me. > b) The class that opens the stream should close the stream. Since there is no stream opening in TextIterable, it is intended to have no closing necessary. The only exception is when one iterates half way and decides to quite. But that is expected to be the less common use case. Cheers, Hanson Char On 10/25/07, Henri Yandell wrote: > On 10/25/07, Hanson Char wrote: > > Henri, > > > > LineIterator is intended/designed to be a hidden implementation behind > > TextIterable. It's like putting the cart in front of the horse. > > Things don't make much sense if LineIterator is taken out of context > > as a standalone public class - issues of InputStream vs Reader, > > encoding, closing of input stream, etc. go away at the higher level of > > abstraction, aka TextIterable. > > My personal view is that: > > a) I hate APIs that force me to think in terms of File/URL and not in > term of streams. It's like not having piping in unix. > b) The class that opens the stream should close the stream. > > > The 1.5 issue is, unfortunate, a real issue. I haven't programmed in > > pre-1.5 Java for 2+ years now. Sorry for the folks who are not so > > lucky. > > Yeah, it's a pain in the arse and more; the inability to move the > libraries to 1.5 slowly kills Commons. Thus you see various > Collections clones out there starting up with a 1.5 focus. A lot of > that though is because Collections -> 1.5 isn't something that you > just wave a magic wand on. > > Personally I finally moved to 1.5 in the last year. 1.4 is yesterday's > trash to me now. As a whole Commons is just about at the point of > being happy to drop 1.3 support, with new components being 1.5+. > > Hen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org