-1

How can I download a file from its download link provided on a webpage using java? For example, I want to download this file: http://rss.cnn.com/rss/edition.rss from http://edition.cnn.com/services/rss/ using Java. What should be my initial steps to accomplish it?

Sohil
  • 11
  • 6
  • Look at http://hc.apache.org/httpcomponents-asyncclient-dev/examples.html – gtgaxiola Sep 17 '12 at 18:40
  • 1
    If I didn't know how I would use Google and search for `java download file from server`. Lots of info there. http://stackoverflow.com/questions/5335610/java-code-to-download-a-file-from-server – km1 Sep 17 '12 at 18:41

3 Answers3

1

Hmm, httpunit? Its sophisticated but I dont know any other way.

tkp33
  • 68
  • 8
0

Use a Java library like JSoup.

BSull
  • 329
  • 2
  • 10
  • Thank you. I'd like to know if there is any other way other than using JSoup library which would be included in packages provided by JDK? – Sohil Sep 17 '12 at 18:47
0

Technically RSS is a XML file. You can download it as a regular file if you want.. See if following link helps

How to download and save a file from Internet using Java?

Community
  • 1
  • 1
Bharat
  • 100
  • 7