Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 99026 invoked from network); 9 Jun 2005 21:48:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 21:48:29 -0000 Received: (qmail 56295 invoked by uid 500); 9 Jun 2005 21:48:23 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 56269 invoked by uid 500); 9 Jun 2005 21:48:23 -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 56162 invoked by uid 99); 9 Jun 2005 21:48:21 -0000 X-ASF-Spam-Status: No, hits=3.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_YAHOO_RCVD X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from web30902.mail.mud.yahoo.com (HELO web30902.mail.mud.yahoo.com) (68.142.200.155) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 09 Jun 2005 14:48:19 -0700 Received: (qmail 75713 invoked by uid 60001); 9 Jun 2005 21:48:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qQ5jHg2jeRTWL3wMH/GByEE7wc9LSSwv27ybPljSkJb+KTqFkLFhKWp8OlHfUN6y91LYwPpRj9F3QNZMXr6THJqK+zw8TrO1qgLK8G86Qpp49tb9v7TqBtTq41MGS15VVZ7Pc56Qsh1hP73NBRgUO5ddyAO8Mz0hhHrsQ6p5ugQ= ; Message-ID: <20050609214808.75711.qmail@web30902.mail.mud.yahoo.com> Received: from [65.247.234.109] by web30902.mail.mud.yahoo.com via HTTP; Thu, 09 Jun 2005 14:48:08 PDT Date: Thu, 9 Jun 2005 14:48:08 -0700 (PDT) From: Matt Benson Subject: Re: [VFS] OutOfMemory Exception on large files To: Jakarta Commons Developers List In-Reply-To: <42A81C07.6050400@ops.co.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --- Mario Ivankovits wrote: > Hi Torsten! > >Michael came up with a workaround. Instead of > >using a ByteArrayOutputStream we use a temp > >file and a FileOutputStream. > Nice idea! > > >He is currently looking into a Piped version. > >Or what do you think how should we solve this? > > > I think a Piped version is the correct solution. > > But please have a look at the perfomance also. > As I said the jdk Piped*Stream use an internal > buffer of 1k. When I try > to use the piped version in jsch (sftp) it gets dog > slow. > I blamed the JDK implementation of the pipe for > this, though I havent > investigated into this any further. > But maybe we also nead our own implementation of > Pipe-Streams. FYI it looks a little hacky perhaps but Ant's codebase has org.apache.tools.ant.util.LeadPipeInputStream that a) doesn't die just because its writing Thread has died, and b) allows you to specify (or change while in use) the buffer size. -Matt __________________________________ Discover Yahoo! Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org