Search code examples
javaswingfile-ioprogressfileutils

Java Download File With Apache IO with Progress Bar


Basically, I'm trying to find a way to download files with Java Apache IO Commons and have a swing progress bar. I know how to download URL to file, using FileUtils.copyUrlToFile(); and such, but how would I add a progress bar?


Solution

  • Commons IO 2.0 and above do have copyInputStreamToFile(InputStream source, File destination), so you can use ProgressMonitorInputStream.