Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 19880 invoked from network); 14 Nov 2008 19:50:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2008 19:50:50 -0000 Received: (qmail 96454 invoked by uid 500); 14 Nov 2008 19:50:56 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 96424 invoked by uid 500); 14 Nov 2008 19:50:56 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 96405 invoked by uid 99); 14 Nov 2008 19:50:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 11:50:56 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2008 19:49:35 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L14gM-0006ke-26 for httpclient-users@hc.apache.org; Fri, 14 Nov 2008 11:50:18 -0800 Message-ID: <20507255.post@talk.nabble.com> Date: Fri, 14 Nov 2008 11:50:18 -0800 (PST) From: umpirsky To: httpclient-users@hc.apache.org Subject: Re: visualizing upload/download status in a statusbar In-Reply-To: <20095771.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: umpirsky@gmail.com References: <1222454912.15668.34.camel@ubuntu> <19900396.post@talk.nabble.com> <1223640151.6234.23.camel@ubuntu> <20087978.post@talk.nabble.com> <20095771.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Cool, it works! Seems like number of bytes sent is about 2Xfile.lenght(). For file size 105542b it sends 211606b, For file size 43062b it sends 86642b any explanation??? Marcel Schiffel wrote: > > Hi, > > it's wrapped around another request entity, for example: > > PostMethod method = new PostMethod(...); > FileRequestEntity fre = new FileRequestEntity(someFile, "contentType"); > method.setRequestEntity(new CountingRequestEntity(fre, listener)); > > I've been able to use it with only minor changes (changed the type of the > listener to ProgressHandle of the Netbeans Progress API). It's > successfully counting the bytes sent, but I'm still not able to determine > the total number of bytes that are sent, before executing the request. I'm > therefore unable to tell the status bar what number of bytes is equivalent > to 100%. Furthermore it is still not clear how to achieve the same thing > when downloading a file (evaluating the response body stream). > -- View this message in context: http://www.nabble.com/visualizing-upload-download-status-in-a-statusbar-tp19685137p20507255.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org