Roland Weber wrote:
Hello David,
Basically I'm looking to get the Request Output Stream from the HTTP
Client after setting time-out parameters, to write file data to the stream
at the same time that it's being read from disk and to avoid loading the
files' bytes into memory ahead of time as when using the PostMethod.
Does anyone know if/how I can do this?
You can't. What you can do is the reverse: you provide an InputStream
from which the HttpClient will read the bytes which will be sent to the
server. See class InputStreamRequestEntity:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/InputStreamRequestEntity.html
HttpClient will take care of chunk encoding.
hope that helps,
Roland
David,
Just implement a custom RequestEntity. When submitting an entity
enclosing request HttpClient passes an OutputStream instance onto the
RequestEntity implementation, which the latter can use to stream out its
content.
Hope this helps
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]