Uses of Class
org.klomp.snark.Snark
Package
Description
I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced
to add a web UI, DHT support, and other features.
The i2psnark user interface, implemented as a webapp in i2psnark.war.
-
Uses of Snark in org.klomp.snark
Modifier and TypeMethodDescriptionSnarkManager.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.SnarkManager.getTorrent
(String filename) Grab the torrent given the (canonical) filename of the .torrent fileSnarkManager.getTorrentByBaseName
(String filename) Grab the torrent given the base name of the storageSnarkManager.getTorrentByInfoHash
(byte[] infohash) Grab the torrent given the info hashSnarkManager.stopTorrent
(String filename, boolean shouldRemove) Stop the torrent, leaving it on the list of torrents unless told to remove it.Modifier and TypeMethodDescriptionvoid
SnarkManager.addDownloader
(Snark torrent) Add and start a FetchAndAdd task.void
CompleteListener.addMessage
(Snark snark, String message) void
SnarkManager.addMessage
(Snark snark, String message) A Snark.CompleteListener method.void
UpdateRunner.addMessage
(Snark snark, String message) void
SnarkManager.deleteMagnet
(Snark snark) Stop and delete a torrent running in magnet modevoid
void
A Snark.CompleteListener method.void
long[]
SnarkManager.getSavedAddedAndCompleted
(Snark snark) Get setting for a torrent from the config file.CompleteListener.getSavedComments
(Snark snark) SnarkManager.getSavedComments
(Snark snark) The conmments for a torrentUpdateRunner.getSavedComments
(Snark snark) boolean
SnarkManager.getSavedCommentsEnabled
(Snark snark) Get setting for comments enabled from the config file.boolean
CompleteListener.getSavedPreserveNamesSetting
(Snark snark) boolean
SnarkManager.getSavedPreserveNamesSetting
(Snark snark) Get setting for a torrent from the config file.boolean
UpdateRunner.getSavedPreserveNamesSetting
(Snark snark) CompleteListener.getSavedTorrentBitField
(Snark snark) SnarkManager.getSavedTorrentBitField
(Snark snark) Get the saved bitfield for a torrent from the config file.UpdateRunner.getSavedTorrentBitField
(Snark snark) long
CompleteListener.getSavedTorrentTime
(Snark snark) not really listeners but the easiest way to get back to an optional SnarkManagerlong
SnarkManager.getSavedTorrentTime
(Snark snark) Get the timestamp for a torrent from the config file.long
UpdateRunner.getSavedTorrentTime
(Snark snark) long
CompleteListener.getSavedUploaded
(Snark snark) long
SnarkManager.getSavedUploaded
(Snark snark) Get setting for a torrent from the config file.long
UpdateRunner.getSavedUploaded
(Snark snark) CompleteListener.gotMetaInfo
(Snark snark) We transitioned from magnet mode, we have now initialized our metainfo and storage.SnarkManager.gotMetaInfo
(Snark snark) We transitioned from magnet mode, we have now initialized our metainfo and storage.UpdateRunner.gotMetaInfo
(Snark snark) void
void
A Snark.CompleteListener method.void
void
SnarkManager.loadSavedFilePriorities
(Snark snark) Get the saved priorities for a torrent from the config file.void
CompleteListener.locked_saveComments
(Snark snark, CommentSet comments) void
SnarkManager.locked_saveComments
(Snark snark, CommentSet comments) Save the conmments for a torrent Caller must synchronize on comments.void
UpdateRunner.locked_saveComments
(Snark snark, CommentSet comments) 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.setSavedCommentsEnabled
(Snark snark, boolean yes) Set setting for comments enabled in the config file.void
SnarkManager.startTorrent
(Snark snark) If not connected, thread it, otherwise inlinevoid
SnarkManager.stopTorrent
(Snark torrent, boolean shouldRemove) Stop the torrent, leaving it on the list of torrents unless told to remove it.void
CompleteListener.torrentComplete
(Snark snark) void
SnarkManager.torrentComplete
(Snark snark) A Snark.CompleteListener method.void
UpdateRunner.torrentComplete
(Snark snark) void
CompleteListener.updateStatus
(Snark snark) void
SnarkManager.updateStatus
(Snark snark) A Snark.CompleteListener method.void
UpdateRunner.updateStatus
(Snark snark) This is called by stopTorrent() among othersModifierConstructorDescriptionPeerCoordinator
(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
Modifier and TypeMethodDescriptionstatic Comparator<Snark>
Sorters.getComparator
(int type, String lang, 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