Hello Peter, this has nothing to do with the InputStream. That stream will always be positioned at the beginning of the response body. But you can ask the server to return only portions of a document by sending an appropriate Range header.
It is up to your application to set the Range header in the request, to verify that the server actually sent only a range of the file, or to decode the multipart format if the server sends the response as several parts with individual range specifications. Check out RFC 2616 (HTTP/1.1), sections 14.35, 3.12, 14.16, 14.5, 19.2 and several others. If you send only a single range specification and there is no interference from range-caching proxies, the complexity should be manageable. If you get multipart responses, things get ugly. hope that helps, Roland Peter Bleckmann <[EMAIL PROTECTED]> 06.06.2005 13:26 Please respond to "HttpClient User Discussion" To httpclient-user@jakarta.apache.org cc Subject Using GetMethod with offset Hi List! I got a question about how to define an offset for the GetMethod. What i am doing so far is to generate an InputStream using the getResponseBodyAsStream() method for reading a huge binary file from a web server. For some reason I don`t want to read the entire file but only a "small" subset of the data, starting somewhere in the file. Using the skip() method (or things like that) to reach the "point of interest" in the input stream is not what I want as will transfer all skipped bytes. So my question is, how to obtain an InputStream starting at a given offset. Thanks for any advice, Peter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]