Greetings,

I'm transitioning from HttpClient 3 to 4.  I believe I've done all of
the necessary translations except for downloading a partial response. 
For example, there are cases where the server response may be very
large, but I'm only interested in the first 50K or so.  In HttpClient 3
I handled this with ContentLengthInputStream, which basically took an
InputStream and the number of bytes to be read.  Nice and easy.  In
HttpClient 4 it's probably equally easy, but I can't figure out just how
to go about it.  The new version of ContentLengthInputStream (found in
HttpComponents Core) takes a SessionInputBuffer, in addition to the
number of bytes to be read.  The trouble is, I can't figure out how to
generate a SessionInputBuffer out of an InputStream (or something like
it) that I might get from the response entity.  Any tips on how to go
about what I'm describing?

Thanks much,

Todd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to