aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes easy karma (file download) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "easy karma (file download)" Watch "easy karma (file download)" New topic
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
    
  13

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]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: easy karma (file download)
 
Similar Threads
question abt web.xml file
Using Mysql dll
gsl.sql.driv
executing java program
Tomcat 5.5 Distribution