How does one display progress of a file copy operation in Java. without using Swing e.g. in a Web app?
问题 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