hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Schiffel" <marcelschif...@googlemail.com>
Subject visualizing upload/download status in a statusbar
Date Fri, 26 Sep 2008 09:22:21 GMT
Hi,

we're successfully using the HttpClient library for several months now, but
now we need a feature that seems quite hard to implement: Sometimes we need
to transmit large files (up to serveral Mb) and therefore have to give some
feedback about the up- or download status to the user. Unfortunately i
haven't found any information on this.

When downloading a file I tried to tell the client the content size by
setting a response header and then count each byte that is read from the
input stream. Unfortunately I still have the feeling that the whole file is
transmitted and I get an InputStream on the result afterwards. When
uploading a file I'm using method.setRequestEntity(new
ByteArrayRequestEntity(content)); and therefore can't even count the
individual bytes.

Is there an event listener that I can register to get notified whenever
another percent of the file transmitted? Is it even possible to implement it
using HttpClient and where can I find some information on this issue (maybe
even sample code)?

many thanks in advance
Marcel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message