コード例 #1
0
 protected List<DownloadLink> loadContainerFile(File file) {
   final LinkCrawler lc = LinkCrawler.newInstance();
   lc.crawl(file.toURI().toString());
   lc.waitForCrawling();
   final ArrayList<DownloadLink> ret = new ArrayList<DownloadLink>(lc.getCrawledLinks().size());
   for (final CrawledLink link : lc.getCrawledLinks()) {
     DownloadLink dl = link.getDownloadLink();
     if (dl == null) {
       final String url = link.getURL();
       if (url != null) {
         dl = new DownloadLink(null, null, null, url, true);
       }
     }
     if (dl != null) {
       ret.add(dl);
     }
   }
   return ret;
 }