You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Clive Borrageiro <cl...@ecis.co.za> on 2005/02/01 16:24:41 UTC

OutOfMemoryError on putMethod

Hi,

I am doing webDavResource.putMethod(path, pipedIn) with a PipedInputStream,
but when I get to about 50MB of uploading the file
I get a 'OutOfMemoryError: Java heap space'.

The reason I need to use a stream is because I need to get progress of the
upload process.
Does anyone know if this is a bug or if there is another way I can implement
progress.

I read that the reason for the OutOfMemoryError is because the
"PutMethod.sendData(InputStream in) 
simply reads all the contents of the InputStream into memory and then writes
the contents as a
large byte[] chunk" - quoted from the mailing list.

Any help will be much appreciated!
Thanks.
Clive


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org