Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.marlovits.plz
Class FileDataDownload

java.lang.Object
  extended by ch.marlovits.plz.FileDataDownload

public class FileDataDownload
extends java.lang.Object

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.

Author:
http://www.javajazzup.com

Constructor Summary
FileDataDownload()
           
 
Method Summary
static void fileDownload(java.lang.String fileAddress, java.lang.String destinationDir)
           
static void FileDownload(java.lang.String fileAddress, java.lang.String localFileName, java.lang.String destinationDir)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDataDownload

public FileDataDownload()
Method Detail

FileDownload

public static void FileDownload(java.lang.String fileAddress,
                                java.lang.String localFileName,
                                java.lang.String destinationDir)

fileDownload

public static void fileDownload(java.lang.String fileAddress,
                                java.lang.String destinationDir)

main

public static void main(java.lang.String[] args)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis