| Author |
easy karma (file download)
|
Jarrod Pritchard
Greenhorn
Joined: Nov 26, 2005
Posts: 1
|
|
Hi everyone. Im a student at RIT who is trying to over-achieve. Im working on an open source project, and although a lot of it is over my head, im holding my own pretty well( i survived the JDBC). Except for this part. I need to connect to the internet, download a file, and save it. I've written methods for calculating its size, MD5, all of that, but now after putting it off, i have to figure out how to download it. Just for completeness - The program is pulling the URL from a MySQL database, then connecting and downloading a program and checking its size, MD5, etc. Im stuck. Ive googled for a day now, and been through the Java Ranch, and I am lost. Thanks alot, these forums have been INVALUABLE to learning java here at RIT. lurch
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
Hi, Welcome to JavaRanch! The java.net.URL class is your friend. The precise code you'd use depends on what you want to do with the downloaded data -- put it into a file, for example, or store it in a database -- but here's one simple version:
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: easy karma (file download)
|
|
|