> -----Original Message----- > From: Rafał Krupiński [mailto:r.krupin...@gmail.com] > Sent: Tuesday, April 06, 2010 03:59 > To: Commons Developers List > Subject: Re: [IO] Progress Monitor > > On Wed, Mar 31, 2010 at 7:37 PM, Gary Gregory > <ggreg...@seagullsoftware.com> wrote: > > Hi All: > > > > We use [io] for our server, which is great, but when looked at using it from > our Eclipse based tools, I found the lack of support for monitoring a blocker. > > > > What about providing and support and pluggable progress monitor, preferable > with the same features as: > > > > > http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/ > reference/api/org/eclipse/core/runtime/IProgressMonitor.html > > I think progress monitoring would be a nice feature, but unless IO > supports copying directories recursively, there's no need for named > tasks and subtasks. > Simple > > interface ProgressMonitor{ > void begin(int whole); > void progress(int current); > void end(); > } > > would suffice. > What methods would you add this progress monitor support to? > IOUtils.copy/Large - for sure, anywhere else?
Everywhere a stream is used for input or output. Everywhere a File is used. I would like to replace my custom code with IOUtils and FilUtils calls to read from URL input streams and File objects pointing to network drives. Reading from local files that are large enough on a slow laptop drive needs feedback. I see adding a version of a method foo(...) with foo(..., ProgressMonitor) where foo(...) calls the other method with a NullMonitor. The API also needs to be able to see a message as part of the progress, so your version of begin() is too restrictive. You need to be able to say "Copying file Foo" and "Reading x of n KB", etc. The Eclipse folks have this pretty well figured out by now :) > > -- > Pozdrawiam / Best Regards > Rafal Krupinski > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org