commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: [VFS] OutOfMemory Exception on large files
Date Thu, 09 Jun 2005 21:48:08 GMT

--- 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 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.


Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message