Using Apache Commons VFS, how do I monitor the progress of a file transfer. I need to be able to do it with uploads and downloads. I also need to monitor progress over HTTP, FTP, SFTP and FTPS. I can’t find anything in the documentation about it.
Share
It can be done by getting input and output streams from VFS. The following example uses a utility class from commons-net (a dependency of VFS) to manage the copying and progress-monitoring. You could equally do it manually.