public static void streamCopy ( final URL url , final FileChannel out , final ProgressBar progressBar ) throws IOException { NullArgumentException . validateNotNull ( url , "URL" ) ; InputStream is = null ; try { is = url . openStream ( ) ; streamCopy ( is , out , progressBar ) ; } finally { if ( is != null ) { is . close ( ) ; } } }
Copy a stream from an urlto a destination .