hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Claassen <ma...@donnell.com>
Subject RE: HttpClient API - upload files using OutputStream not Filepart
Date Mon, 21 May 2012 13:12:49 GMT
It is pretty easy to make your own HttpEntity.  There are just a few methods.  You can just
implement this interface to wrap
whatever object you are dealing with.  Then in the writeTo method, you can read from your
stream and write it out right away.

-----Original Message-----
From: Emilian Utma [mailto:utma.emilian@gmail.com] 
Sent: Monday, May 21, 2012 8:55 AM
To: httpclient-users@hc.apache.org
Subject: HttpClient API - upload files using OutputStream not Filepart

Hello,

I want to know if is possible to upload a file which its content is set via a java.io.OutputStream
(as in "old times" when using
java.net.HttpURLConnection) not
org.apache.commons.httpclient.methods.multipart.FilePart.Filepart.

I need this behaviour because the content is provided by another application not mine. To
save the content in a "temp" zone is not
an option because it is possible to receive hundreds of files per seconds ... and this will
require a "big temp".

Thank you in advance.

Best regards,
Emil


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message