That's great, thanks a lot Mike.
Yong Chen -----Original Message----- From: Michael Becke [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 4:34 PM To: Commons HttpClient Project Subject: Re: file upload (PUT method) progress report Hi Yong, > 1. I'm actually using putmethod, not postmethod, but I assume your > suggest applies to putmethod too, is it correct? Yes, the same thing will work for both methods. > 2. Since my "put" will put (upload) a local file onto server, so I > think ProgressInputStream will take a FileInputStream as parameter in > its constructor, is it right? I could be a FileInputStream, a file, or perhaps something else. Whatever works for you is good. The key is that the ProgressInputStream will wrap the actual stream and keep track of progress. > 3. The callListeners in ProgressInputStream has following line: > this.listeners.callListeners( new ProgressEvent( this, > this.current, this.total ) ); > did you mean: > this.listeners.invokeListeners? Yes, I would assume so. I also suggest adding the ability to delay progress notification. In particular I would setup some kind of threshold so that notification is only given for every X bytes read, instead of after every call to read(). This will help to cut down on over notification in the event that data is read in small chunks. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] SPECIAL NOTICE All information transmitted hereby is intended only for the use of the addressee(s) named above and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of confidential and privileged information is prohibited. If the reader of this message is not the intended recipient(s) or the employee or agent responsible for delivering the message to the intended recipient, you are herby notified that you must not read this transmission and that disclosure, copying, printing, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. Anyone who receives confidential and privileged information in error should notify us immediately by telephone and mail the original message to us at the above address and destroy all copies. To the extent any portion of this communication contains public information, no such restrictions apply to that information. (gate01) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]