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]



Reply via email to