Hi Mikkel, As you might know Jérôme is away (I think he'll be back next week).
> When I try to send large files from a GenericClient I often run into an > OutOfMemoryError. > Apparently the ByteUtils.write(InputStream, OutputStream) method wraps a > BufferedOutputStream around the OutputStream (why?) The support for large files in HttpUrlConnection is a bit weak. But I think it was enhanced in Java 5. Maybe this bug report helps you http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745 If I am not mistaken, [HttpClient] supports uploading large files; maybe you can look into the source code what they are doing. [HttpClient] http://jakarta.apache.org/commons/httpclient/ Best regards, Lars -- http://www.semagia.com