visad.install
Class Download

java.lang.Object
  extended by visad.install.Download
Direct Known Subclasses:
TestDownload

public abstract class Download
extends Object

Download a file from a URL to a local directory.


Constructor Summary
Download()
           
 
Method Summary
static void getFile(URL url, File saveFile, boolean verbose)
          Save the file found at the URL to the specified directory.
static void getFile(URL url, File saveFile, boolean backUpExisting, boolean verbose)
          Save the file found at the URL to the specified directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Download

public Download()
Method Detail

getFile

public static void getFile(URL url,
                           File saveFile,
                           boolean verbose)
Save the file found at the URL to the specified directory.

If saveFile exists and is a file, it is overwritten.

Parameters:
url - the file to download
saveFile - the directory or file to which the downloaded file is written
verbose - true if a running commentary of the download's progress is desired.

getFile

public static void getFile(URL url,
                           File saveFile,
                           boolean backUpExisting,
                           boolean verbose)
Save the file found at the URL to the specified directory.

Parameters:
url - the file to download
saveFile - the directory or file to which the downloaded file is written
backUpExisting - true if any existing saveFile should be backed up
verbose - true if a running commentary of the download's progress is desired.