de.aitools.aq.webdownload
Class DownloadThread

java.lang.Object
  extended by de.aitools.aq.webdownload.DownloadThread
All Implemented Interfaces:
java.lang.Runnable

public class DownloadThread
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
DownloadThread(java.io.File inputUrls, int id, java.lang.String outputDirBaseName, double probability)
          Creates a DownloadThread with id id that reads inputUrls and downloads the contents of each url to a separate file located in outputDirBaseName+id.
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadThread

public DownloadThread(java.io.File inputUrls,
                      int id,
                      java.lang.String outputDirBaseName,
                      double probability)
Creates a DownloadThread with id id that reads inputUrls and downloads the contents of each url to a separate file located in outputDirBaseName+id. The probability designates how much of the urls should be downloaded. I.e. if a value of 0.05 is given, only 5% of the urls will be downloaded. The downloaded urls are chosen randomly from the urls file. This was added to avoid filesystem problems with very long url lists. If one want to load all urls, any value >= 1.0 will be sufficient.

Parameters:
inputUrls -
outputDirBaseName -
threadNr -
probability -
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable