com.mindprod.filetransfer
Class Download

java.lang.Object
  extended by com.mindprod.filetransfer.Download

public final class Download
extends java.lang.Object

command line automated download a file from the Internet.

use: java com.mindprod.filetransfer.Download http://x.com/y.html C:\y.txt

Since:
1999
Version:
2.5 2008-08-10 - add setReadTimeout and setConnectTimeout methods.
Author:
Roedy Green, Canadian Mind Products

Method Summary
static boolean downloadOneFile(java.lang.String urlString, java.lang.String filename)
          Download one file
static void main(java.lang.String[] args)
          Command line Download
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

downloadOneFile

public static boolean downloadOneFile(java.lang.String urlString,
                                      java.lang.String filename)
Download one file

Parameters:
urlString - source URL of file to download e.g."http://www.billabong.com:80/songs/lyrics.txt" works with http:, https:, file: and possibly others.
filename - target name of file to save on hard disk.
Returns:
true if download succeeded
See Also:
"com.mindprod.http.Fetch"

main

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

Parameters:
args - source url, target file source URL of file to download e.g."http://www.billabong.com:80/songs/lyrics.txt" works with http:, https:, file: and possibly others.