Uses of Class
org.klomp.snark.Snark

Packages that use Snark
org.klomp.snark I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced to add a web UI, DHT support, and other features. 
org.klomp.snark.web The i2psnark user interface, implemented as a webapp in i2psnark.war. 
 

Uses of Snark in org.klomp.snark
 

Methods in org.klomp.snark that return Snark
 Snark SnarkManager.addMagnet(String name, byte[] ih, String trackerURL, boolean updateStatus, boolean autoStart, File dataDir, CompleteListener listener)
          Add a torrent with the info hash alone (magnet / maggot) External use is for UpdateRunner.
 Snark SnarkManager.getTorrent(String filename)
          Grab the torrent given the (canonical) filename of the .torrent file
 Snark SnarkManager.getTorrentByBaseName(String filename)
          Grab the torrent given the base name of the storage
 Snark SnarkManager.getTorrentByInfoHash(byte[] infohash)
          Grab the torrent given the info hash
 Snark SnarkManager.stopTorrent(String filename, boolean shouldRemove)
          Stop the torrent, leaving it on the list of torrents unless told to remove it.
 

Methods in org.klomp.snark that return types with arguments of type Snark
 Collection<Snark> SnarkManager.getTorrents()
          Unmodifiable
 

Methods in org.klomp.snark with parameters of type Snark
 void SnarkManager.addDownloader(Snark torrent)
          Add and start a FetchAndAdd task.
 void SnarkManager.addMessage(Snark snark, String message)
          A Snark.CompleteListener method.
 void CompleteListener.addMessage(Snark snark, String message)
           
 void UpdateRunner.addMessage(Snark snark, String message)
           
 void SnarkManager.deleteMagnet(Snark snark)
          Stop and delete a torrent running in magnet mode
 void SnarkManager.fatal(Snark snark, String error)
          A Snark.CompleteListener method.
 void CompleteListener.fatal(Snark snark, String error)
           
 void UpdateRunner.fatal(Snark snark, String error)
           
 long[] SnarkManager.getSavedAddedAndCompleted(Snark snark)
          Get setting for a torrent from the config file.
 boolean SnarkManager.getSavedPreserveNamesSetting(Snark snark)
          Get setting for a torrent from the config file.
 boolean CompleteListener.getSavedPreserveNamesSetting(Snark snark)
           
 boolean UpdateRunner.getSavedPreserveNamesSetting(Snark snark)
           
 BitField SnarkManager.getSavedTorrentBitField(Snark snark)
          Get the saved bitfield for a torrent from the config file.
 BitField CompleteListener.getSavedTorrentBitField(Snark snark)
           
 BitField UpdateRunner.getSavedTorrentBitField(Snark snark)
           
 long SnarkManager.getSavedTorrentTime(Snark snark)
          Get the timestamp for a torrent from the config file.
 long CompleteListener.getSavedTorrentTime(Snark snark)
          not really listeners but the easiest way to get back to an optional SnarkManager
 long UpdateRunner.getSavedTorrentTime(Snark snark)
           
 long SnarkManager.getSavedUploaded(Snark snark)
          Get setting for a torrent from the config file.
 long CompleteListener.getSavedUploaded(Snark snark)
           
 long UpdateRunner.getSavedUploaded(Snark snark)
           
 String SnarkManager.gotMetaInfo(Snark snark)
          We transitioned from magnet mode, we have now initialized our metainfo and storage.
 String CompleteListener.gotMetaInfo(Snark snark)
          We transitioned from magnet mode, we have now initialized our metainfo and storage.
 String UpdateRunner.gotMetaInfo(Snark snark)
           
 void SnarkManager.gotPiece(Snark snark)
          A Snark.CompleteListener method.
 void CompleteListener.gotPiece(Snark snark)
           
 void UpdateRunner.gotPiece(Snark snark)
           
 void SnarkManager.loadSavedFilePriorities(Snark snark)
          Get the saved priorities for a torrent from the config file.
 void SnarkManager.recheckTorrent(Snark snark)
          Threaded.
 void SnarkManager.saveTorrentStatus(Snark snark)
          Save the completion status of a torrent and other data in the config file for that torrent.
 void SnarkManager.startTorrent(Snark snark)
          If not connected, thread it, otherwise inline
 void SnarkManager.stopTorrent(Snark torrent, boolean shouldRemove)
          Stop the torrent, leaving it on the list of torrents unless told to remove it.
 void SnarkManager.torrentComplete(Snark snark)
          A Snark.CompleteListener method.
 void CompleteListener.torrentComplete(Snark snark)
           
 void UpdateRunner.torrentComplete(Snark snark)
           
 void SnarkManager.updateStatus(Snark snark)
          A Snark.CompleteListener method.
 void CompleteListener.updateStatus(Snark snark)
           
 void UpdateRunner.updateStatus(Snark snark)
          This is called by stopTorrent() among others
 

Constructors in org.klomp.snark with parameters of type Snark
PeerCoordinator(I2PSnarkUtil util, byte[] id, byte[] infohash, MetaInfo metainfo, Storage storage, CoordinatorListener listener, Snark torrent)
           
TrackerClient(I2PSnarkUtil util, MetaInfo meta, String additionalTrackerURL, PeerCoordinator coordinator, Snark snark)
          Call start() to start it.
 

Uses of Snark in org.klomp.snark.web
 

Subclasses of Snark in org.klomp.snark.web
 class FetchAndAdd
          A cancellable torrent file downloader.
 

Methods in org.klomp.snark.web that return types with arguments of type Snark
static Comparator<Snark> Sorters.getComparator(int type, I2PSnarkServlet servlet)
          Negative is reverse 0, 1: Name 2: Status 3: Peers 4: ETA 5: Size 6: Downloaded 7: Uploaded 8: Down rate 9: Up rate 10: Remaining (needed) 11: Upload ratio 12: File type