Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 67268 invoked from network); 31 Jan 2006 09:03:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Jan 2006 09:03:00 -0000 Received: (qmail 88967 invoked by uid 500); 31 Jan 2006 09:02:56 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 88894 invoked by uid 500); 31 Jan 2006 09:02:55 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 88883 invoked by uid 99); 31 Jan 2006 09:02:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2006 01:02:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [80.68.88.131] (HELO vhost.badgers-in-foil.co.uk) (80.68.88.131) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2006 01:02:54 -0800 Received: from dave by vhost.badgers-in-foil.co.uk with local (Exim 4.50) id 1F3rPE-0006kN-Eb for commons-dev@jakarta.apache.org; Tue, 31 Jan 2006 09:02:32 +0000 Date: Tue, 31 Jan 2006 09:02:31 +0000 From: David Holroyd To: commons-dev@jakarta.apache.org Subject: [fileupload] Efficient upload stream reading API? Message-ID: <20060131090230.GA17525@badgers-in-foil.co.uk> Mail-Followup-To: David Holroyd , commons-dev@jakarta.apache.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: dave@badgers-in-foil.co.uk X-SA-Exim-Scanned: No (on vhost.badgers-in-foil.co.uk); SAEximRunCond expanded to false X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N All, The current FileUpload API only allows uploaded data to be read by the application if an intermediate buffer (i.e. DiskFileItem) is used. It would be very handy if the low-level interfaces provided read access to the uploaded file data. Currently, the API provided by MultipartStream is in terms of an OutputStream, int readBodyData(OutputStream output) I am proposing the addition of a method like, InputStream readBodyData() I've started hacking together some code to add this functionality, and to re-implemented the original readBodyData(OutputStream) method in terms of this using IOUtils.copy(int, out). Would a patch along these lines be accepted? thanks, dave -- http://david.holroyd.me.uk/ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org