I have a web application which needs to perform a file copy operation and show user a progress bar.
Currently, the copy is being done by calling cpio
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 cpio
for archiving purposes, but the actual copy would be performed by a Java class.
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.