Class FetchAndAdd

java.lang.Object
org.klomp.snark.Snark
org.klomp.snark.web.FetchAndAdd
All Implemented Interfaces:
Runnable, EepGet.StatusListener, CoordinatorListener, ShutdownListener, StorageListener

public class FetchAndAdd
extends Snark
implements EepGet.StatusListener, Runnable
A cancellable torrent file downloader. We extend Snark so its status may be easily listed in the web table without adding a lot of code there. Upon successful download, this Snark will be deleted and a "real" Snark created. The methods return values similar to a Snark in magnet mode. A fake info hash, which is the SHA1 of the URL, is returned to prevent duplicates. This Snark may be stopped and restarted, although a partially downloaded file is discarded.
Since:
0.9.1 Moved from I2PSnarkUtil