title: How does one display progress of a file copy operation in Java. without using Swing e.g. in a Web app?
body: <p>I have a web application which needs to perform a file copy operation and show user a progress bar.</p>
  
  <p>Currently, the copy is being done by calling <code>cpio</code> which cannot give progress to the Java code until after the operation has completed. While it would be possible to use Java to monitor the number of bytes written vs. number of bytes read for an estimate of the copy progress, I think there might be a simpler solution if I code the actual copy operation in Java. I would still use <code>cpio</code> for archiving purposes, but the actual copy would be performed by a Java class.</p>
  
  <p>Most of the help I found in my searching was related to progressMonitor, which incorporates a swing component, and I'm not sure that it can do what I want. All I need is an integer/double of the progress which I can feed to my web application's progress bar component as a % out of 100.</p>