-3

Is there a java library which i could use to download from urls with ftp or http protocol?

like: http://cmp.felk.cvut.cz/~chum/papers/philbin07cvpr.pdf

fatevil
  • 47
  • 1
  • 10
  • [Google: Java FTP download](http://www.google.com/search?q=java+ftp+download) | [Google: Java download HTTP file](http://www.google.com/search?q=java+download+http+file) → Search before posting. – BackSlash Aug 19 '13 at 12:43
  • well, i've searched these, but those solutions doesnt solve my problem, so i finally asked for a library, which makes all alone – fatevil Aug 19 '13 at 12:49
  • All those codes found with google do work just perfectly, my guess is that you didn't really try them. If you tried them you should check your firewall rules, maybe your app is blocked. – BackSlash Aug 19 '13 at 12:51

2 Answers2

1

With Java 7, try the Java NIO. Or the Apache Commons-Lib, it's just on line:

org.apache.commons.io.FileUtils.copyURLToFile(URL, File)
BackSlash
  • 21,927
  • 22
  • 96
  • 136
VWeber
  • 1,261
  • 2
  • 12
  • 34
0

you can write your own scraper tool for that. Here is an tutorial how to do that http://twit88.com/blog/2008/01/06/java-writing-a-web-page-scraper-or-web-data-extraction-tool/

if you just want to download files check this question stackoverflow.com/questions/2302233/…. If you want to download files from unknown links within a webpage use: jsoup.org you can navigate the page using DOM if you know the page structure: jsoup.org/cookbook/extracting-data/dom-navigation

kaushik gandhi
  • 768
  • 8
  • 14
  • its not about im just lazy, i've been searching in the internet for hours, but none of these codes solved the problem, so i decided to ask about some library that could help me... – fatevil Aug 19 '13 at 12:45
  • if you just want to download files check this question http://stackoverflow.com/questions/2302233/download-file-by-passing-url-using-java-code. If you want to download files from unknown links within a webpage use: http://jsoup.org/ you can navigate the page using DOM if you know the page structure: http://jsoup.org/cookbook/extracting-data/dom-navigation – kaushik gandhi Aug 19 '13 at 12:49