Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 63236 invoked from network); 21 Apr 2006 12:31:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Apr 2006 12:31:45 -0000 Received: (qmail 84409 invoked by uid 500); 21 Apr 2006 12:31:22 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 84363 invoked by uid 500); 21 Apr 2006 12:31:22 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 84351 invoked by uid 99); 21 Apr 2006 12:31:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2006 05:31:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of antoine@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 21 Apr 2006 05:31:20 -0700 Received: (qmail invoked by alias); 21 Apr 2006 12:30:58 -0000 Received: from 207-237-61-80.c3-0.nyr-ubr2.nyr.ny.cable.rcn.com (EHLO [192.168.11.3]) [207.237.61.80] by mail.gmx.net (mp001) with SMTP; 21 Apr 2006 14:30:58 +0200 X-Authenticated: #22961642 Message-ID: <4448D06D.20909@gmx.de> Date: Fri, 21 Apr 2006 08:30:37 -0400 From: Antoine Levy-Lambert User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Ant Developers List Subject: Re: [patch] NioFileUtils, Java6FileUtils, FileUtilsAdapter + factory, build.xml (was Re: AW: Adding a methof to StringUtils) References: <20060420205206.90272.qmail@web30904.mail.mud.yahoo.com> <4447FAA3.4060709@gmx.de> <44486274.2050801@it.fts-vn.com> In-Reply-To: <44486274.2050801@it.fts-vn.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Kevin, Kev Jackson wrote: > Ok, this is what I've managed to bash together this morning: > > - NioFileUtils (uses Java1.4 NIO libraries, altered the TRANSFER_SIZE > as suggested to 32000, currently no way to override that (yet)) > - Java6FileUtils (currently has no implementation, but could be used > in future for implementing Java6 features (file permisions etc)) > - FileUtils (refactored to imlement interface, still needs to have all > comments refactored into @see -> interface) > - FileUtilsAdapter (interface of FileUtils) > - FileUtilsFactory (uses runtime class-loading to select correct > version, also allows for selection of impl via system property or ant > property (project.getProperty), as suggested, caches the instance of > the FileUtilsAdapter on first use. This assumes that during a build a > user won't want to swap out FilUtils implementations.) > - build.xml (contains the selector code for [Nio|Java6]FileUtils) > > Current problems: > I cannot get the current code to select the implementation based on > the property I'm specifying - (I'm using .ant.properties and I've also > tried -D style props). Any hint as to how this mechanism works in > general would be appreciated. Did you try to debug it ? It seems to work well for regular expressions. > Code is just in util package, it would be nicer in it's own separate > package - open to suggestions on this. > Not sure that the selector in the build is working - after bootstrap + > build, the ant-nodeps.jar doesn't contain the Nio or the > Java6FileUtils - should they be here? > > Patch attached for consideration and comments. > One issue : If NIOFileUtils is in the same package as FileUtils, bootstrapping under JDK 1.2 or 1.3 would not work. The bootstrap scripts (build.bat, build.sh) are using primitive mechanisms (directories) to find out what should be built first. > Btw, swapping to NIO does help the AppFuse build to get past the > copying - it now fails on HtmlUnit - which we can't do much about. So > (anecdotally anyway), NIO seems to use less memory than traditional IO. > Good news. > Thanks > Kev > ------------------------------------------------------------------------ Regards, Antoine --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org