FileDocCategorySizeDatePackage
Torrent.javaAPI DocAzureus 3.0.3.44909Tue Mar 06 15:53:00 GMT 2007org.gudy.azureus2.plugins.torrent

Torrent

public interface Torrent
author
parg

Fields Summary
Constructors Summary
Methods Summary
public java.lang.ObjectgetAdditionalProperty(java.lang.String name)
Access to top-level properties in the torrent

param
name
return

public java.net.URLgetAnnounceURL()

public TorrentAnnounceURLListgetAnnounceURLList()
get the announce list for multi-tracker torrents. Will always be present but may contain 0 sets which means that this is not a multi-tracker torrent

return

public java.lang.StringgetComment()

public java.lang.StringgetCreatedBy()

public longgetCreationDate()

public java.lang.StringgetEncoding()

public TorrentFile[]getFiles()

public byte[]getHash()

public java.net.URLgetMagnetURI()
Gets the magnet URI for the torrent - throws exception if not available

return

public java.util.MapgetMapProperty(java.lang.String name)
Gets a previously set map value

see
setMapProperty
param
name should be unique across plugins (i.e. prefix it with something unique)
return

public java.lang.StringgetName()

public longgetPieceCount()

public longgetPieceSize()

public byte[][]getPieces()

public java.lang.StringgetPluginStringProperty(java.lang.String name)
Get a property specific to this plugin

param
name
return

public longgetSize()
If size is 0 then this is an "external" torrent and we only know its hash (and name constructed from hash). e.g. we don't know file details

return

public booleanisComplete()

public booleanisDecentralised()
A decentralised torrent uses the DHT only as a "tracker"

return

public booleanisDecentralisedBackupEnabled()
Decentralised backup permits the DHT to be used as a tracker when the "real" tracker is unavailable

return

public booleanisDecentralisedBackupRequested()

public booleanisPrivate()
A private torrent is either explicitly private via info/private or has decentralised backup disabled and peer exchange disabled

return

public org.gudy.azureus2.plugins.torrent.TorrentremoveAdditionalProperties()
Removal all non-standard properties (excluding plugin-properties below)

return

public voidsave()
Saves the torrent to its persistent location

throws
TorrentException

public voidsetAnnounceURL(java.net.URL url)

public voidsetComment(java.lang.String comment)

public voidsetComplete(java.io.File data_dir)
sets the torrent complete - i.e. ready for seeding. Doing this avoids a recheck on torrent addition

param
data_dir
throws
TorrentException

public voidsetDecentralisedBackupRequested(boolean requested)
By default torrents with OK trackers are not tracked in the DHT. This allows a specific torrent to be marked so that it will be

param
requested

public voidsetDefaultEncoding()

public voidsetEncoding(java.lang.String encoding)

public voidsetMapProperty(java.lang.String name, java.util.Map value)
Sets a map property in the torrent, retrievable via getMapProperty

param
name should be unique across plugins (i.e. prefix it with something unique)
param
value bencodable Map value

public voidsetPluginStringProperty(java.lang.String name, java.lang.String value)
Set a property specific to this plugin

param
name
param
value

public voidsetPrivate(boolean priv)

public booleanwasCreatedByUs()

since
2501
return

public byte[]writeToBEncodedData()

public voidwriteToFile(java.io.File file)

public java.util.MapwriteToMap()