efficient Request Body copy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

efficient Request Body copy

LeanderK
Hello,
i need to write the body of an request into an outputstream. What is the most efficient way to do this? Especially if the body may be larger i can not first read the entire thing into the memory and then write it into the output stream. I also need the to the reverse and write to a response from an inputstream. My use case is comparable to an reverse-proxy, but instead i am piping it through existing socket connections in a specific format and reading the response.
Leander
Reply | Threaded
Open this post in threaded view
|

Re: efficient Request Body copy

danveloper
Administrator