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:[email protected]] 
Sent: Monday, May 21, 2012 8:55 AM
To: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to