hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <b...@redwerk.com>
Subject Re: How to get the bytes transferred during a download?
Date Wed, 11 Mar 2009 21:32:15 GMT
On Wed, Feb 18, 2009 at 03:05:24PM +0100, Manuel Domínguez Alvera wrote:
> But how can I count the bytes that have been transferred? What Class? 
> What Method?

We used custom socket factories, whose return a subclass of Socket, capable of
returning an instance of Stream, counting bytes read from an underlying
stream. So we were able to calculate throughput.

You will need to create the custom socket factory and simply pass it to
appropriate protocol in HttpClient. Please take care of this (sources/docs)
and if you would still have any questions - come back and ask ;)

Hope that helps.

-- 
Eugene N Dzhurinsky

Mime
View raw message