commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: [VFS] OutOfMemory Exception on large files
Date Thu, 09 Jun 2005 10:37:59 GMT
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.

>PS: shall we post the patch to bugzilla?
You mean the Piped version - sure, please ;-)
But please post the temp-file workaround too, with low-priority and as 
enhancement - will see what the future brings.


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

View raw message