edu.depauw.csc.dcheeseman.wgetjava
Class WGETJava

java.lang.Object
  extended by edu.depauw.csc.dcheeseman.wgetjava.WGETJava

public class WGETJava
extends java.lang.Object

Author:
David Cheeseman DePauw '08 Last revised 080505.

Constructor Summary
WGETJava()
           
 
Method Summary
static WGETJavaResults DownloadFile(java.net.URL theURL)
          This function downloads the file specified in the URL to the current working directory.
static void main(java.lang.String[] args)
          Command line component.
private static void outputUsage()
          Outputs the usage of the command line component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WGETJava

public WGETJava()
Method Detail

main

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

Parameters:
args -

outputUsage

private static void outputUsage()
Outputs the usage of the command line component.


DownloadFile

public static WGETJavaResults DownloadFile(java.net.URL theURL)
                                    throws java.io.IOException
This function downloads the file specified in the URL to the current working directory.

Parameters:
theURL - The URL of the file to be downloaded.
Returns:
An integer result based on the WGETJavaResults Enumeration. Values Include: FAILED_IO_EXCEPTION - Could not open a connection to the URL. FAILED_UKNOWNTYPE - Could not determine the file type. COMPLETE - Downloaded completed sucessfully.
Throws:
java.io.IOException