FileDocCategorySizeDatePackage
TorrentManager.javaAPI DocAzureus 3.0.3.45178Mon Mar 26 14:39:52 BST 2007org.gudy.azureus2.plugins.torrent

TorrentManager

public interface TorrentManager
author
parg

Fields Summary
public static final int
PRESERVE_NONE
Preserve no additional Attributes value is 0
public static final int
PRESERVE_ENCODING
Preserve the encoding Attribute value is 0x00000001
public static final int
PRESERVE_ALL
Preserve all additional Attributes value is 0xffffffff;
Constructors Summary
Methods Summary
public voidaddListener(TorrentManagerListener l)

public TorrentcreateFromBEncodedData(byte[] data)
decodes a torrent encoded using the normal "bencoding" rules from a byte array

param
file
return
throws
TorrentException

public TorrentcreateFromBEncodedData(byte[] data, int preserve)
decodes a torrent encoded using the normal "bencoding" rules from a byte array

param
data
param
preserve PRESERVE_* flags
return
throws
TorrentException
author
Damokles
since
3009

public TorrentcreateFromBEncodedFile(java.io.File file)
decodes a torrent encoded using the normal "bencoding" rules from a file

param
file
return
throws
TorrentException

public TorrentcreateFromBEncodedFile(java.io.File file, boolean for_seeding)
decodes a torrent encoded using the normal "bencoding" rules from a file but discards the piece hashes to save memory. note that this means that if something reads the hashes they will be re-read from the torrent file and if the file has since been deleted things go smelly

param
file
param
for_seeding reduces memory usage by discarding piece hashes
return

public TorrentcreateFromBEncodedFile(java.io.File file, int preserve)
decodes a torrent encoded using the normal "bencoding" rules from a file

param
file
param
preserve PRESERVE_* flags
return
throws
TorrentException
author
Damokles
since
3009

public TorrentcreateFromBEncodedInputStream(java.io.InputStream data)
decodes a torrent encoded using the normal "bencoding" rules from an InputStream

param
file
return
throws
TorrentException

public TorrentcreateFromBEncodedInputStream(java.io.InputStream data, int preserve)
decodes a torrent encoded using the normal "bencoding" rules from an InputStream

param
data
param
preserve PRESERVE_* flags
return
throws
TorrentException
author
Damokles
since
3009

public TorrentcreateFromDataFile(java.io.File data, java.net.URL announce_url)
creates a new torrent from an input file

param
data
return
throws
TorrentException

public TorrentcreateFromDataFile(java.io.File data, java.net.URL announce_url, boolean include_other_hashes)

public TorrentCreatorcreateFromDataFileEx(java.io.File data, java.net.URL announce_url, boolean include_other_hashes)

public TorrentAttributegetAttribute(java.lang.String name)
Gives access to the standard built-in attributes

param
name
return

public TorrentAttribute[]getDefinedAttributes()
Gives access to the currently defined torrent attributes. As of 2.1.0.2 only "category" is defined, however in the future more could be added such as "quality", "bit rate" etc.

return

public TorrentAttributegetPluginAttribute(java.lang.String name)
Gives access to/creates arbitrary String attributes for plugins to use

param
name
return

public TorrentDownloadergetURLDownloader(java.net.URL url)

public TorrentDownloadergetURLDownloader(java.net.URL url, java.lang.String user_name, java.lang.String password)

public voidremoveListener(TorrentManagerListener l)