On Sat, 2008-09-20 at 06:43 -0700, ANEESHCH wrote: > Hi, > I have a requirement for sending a huge stream, created by uploading a 2GB > file, using fileupload to a remote file share using Http. When I'm tried > with java.net.HttpURLConnection, it was failing by throwing OutOfmemory > error. > 1) Can I make use of HttpClient in this scenario? > 2)What's the max file size which can be send using HttpClient? > 3)Is it request streaming which I have to use for this purpose. > > My application is running on, Websphere Application Server ND 5.1. and the > current max heap size of eah JVM is 768M. > > > Any help is appreciated.. > > Thanks in advance >
HttpClient can stream out entities up to 2^63-1 (Long#MAX_VALUE) when using content-length delimited content or unlimited when using chunk encoding. See the example: http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/trunk/src/examples/UnbufferedPost.java Hope this helps Oleg > -A --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
