On Mon, 2006-08-07 at 09:11 -0500, Lance Woodson wrote:
> I'm using HttpClient for a project where we are automating the 
> pushing/pulling of files using various protocols.  These are data files 
> that may be in varying formats (tab delimited, comma delimited, relevant 
> data in different columns, etc...).  One desired feature is to allow a 
> test function, wherein a small sample is taken from the file -- say the 
> first 10 lines -- which is then parsed according to the users formatting 
> settings and displayed back to the user so they can see if there are any 
> problems with the way they have set the transfer up.
> 
> I know it is a longshot, but I'll go ahead and ask:  Is there anyway 
> that HttpClient could be used to download only a portion of a file 
> delivered from a web server?  Or am I going to have to look into using 
> lower-level IO to implement this?
> 

There are two options. (1) Just abort the method  by calling
HttpMethod#abort after having read the required part of the response
content. (2) Use Range directive (for details see RFC2616, section 14.35
[1])

Oleg

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

> 
> 
> ________________________________________
> 
> SKYLIST
> Email Marketing Solutions that Deliver
> Service You Can Trust
> 
> You are receiving this email message
> from a representative of SKYLIST, Inc.
> 701 Brazos, Ste 700, Austin, TX 78701
> Toll Free: 877.250.2922
> 
> To cease all communication with SKYLIST, visit
> http://www.skylist.net/unsubscribe
> or send an email to [EMAIL PROTECTED] 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to