Class wget
java.lang.Object
|
+--wget
- public class wget
- extends java.lang.Object
This class does a simple HTTP get and writes the retrieved content to a local file
Field Summary |
(package private) static java.lang.String |
FS
|
Constructor Summary |
wget()
|
Method Summary |
static void |
createAFile(java.lang.String outfile,
java.lang.String content)
Writes a String to a local file |
void |
get(java.lang.String theUrl,
java.lang.String filename)
This mehtod does the actual GET |
static void |
main(java.lang.String[] args)
The main method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FS
static final java.lang.String FS
wget
public wget()
get
public void get(java.lang.String theUrl,
java.lang.String filename)
throws java.io.IOException
- This mehtod does the actual GET
- Parameters:
theUrl
- The URL to retrievefilename
- the local file to save to
- Throws:
java.io.IOException
createAFile
public static void createAFile(java.lang.String outfile,
java.lang.String content)
throws java.io.IOException
- Writes a String to a local file
- Parameters:
outfile
- the file to write tocontent
- the contents of the file
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
- The main method.
- Parameters:
args
-