Tips 'n' Tricks Posted on: October 8, 2010 By Deepak Kumar
This Java program lets you download files from one or more URLs and save them in the directory where you want.
Tips 'n' Tricks
Download files data from many
URLs This Java program lets you download files from one or more URLs and save them in the directory where you want. This program takes destination directory for the files to save as first command line argument and URLs for the files as next command line arguments separated by space. Java provides
URLConnection class that represents a communication link between the application and a URL. Invoking the openConnection method on a URL creates URLConnection object. Now get InputStream object from that connection and read the data. Finally write the data to the local file.
Ask Questions? Discuss: Tips 'n' Tricks
Post your Comment