Class RPTorrentManager
java.lang.Object
com.biglybt.pifimpl.remote.RPObject
com.biglybt.pifimpl.remote.torrent.RPTorrentManager
- All Implemented Interfaces:
TorrentManager, Serializable
- See Also:
-
Field Summary
FieldsFields inherited from class RPObject
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverseFields inherited from interface TorrentManager
PRESERVE_ALL, PRESERVE_ENCODING, PRESERVE_NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_setDelegate(Object _delegate) voidstatic RPTorrentManagercreate(TorrentManager _delegate) createFromBEncodedData(byte[] data) decodes a torrent encoded using the normal "bencoding" rules from a byte arraycreateFromBEncodedData(byte[] data, int preserve) decodes a torrent encoded using the normal "bencoding" rules from a byte arraycreateFromBEncodedFile(File file) decodes a torrent encoded using the normal "bencoding" rules from a filecreateFromBEncodedFile(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.createFromBEncodedFile(File file, int preserve) decodes a torrent encoded using the normal "bencoding" rules from a filedecodes a torrent encoded using the normal "bencoding" rules from an InputStreamcreateFromBEncodedInputStream(InputStream data, int preserve) decodes a torrent encoded using the normal "bencoding" rules from an InputStreamcreateFromDataFile(File data, URL announce_url) creates a new torrent from an input filecreateFromDataFile(File data, URL announce_url, boolean include_other_hashes) createFromDataFileEx(File data, URL announce_url, boolean include_other_hashes) getAttribute(String name) Gives access to the standard built-in attributesGives access to the currently defined torrent attributes.getPluginAttribute(String name) Gives access to/creates arbitrary String attributes for plugins to use.getURLDownloader(URL url) getURLDownloader(URL url, String user_name, String password) voidMethods inherited from class RPObject
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupported
-
Field Details
-
delegate
-
-
Constructor Details
-
RPTorrentManager
-
-
Method Details
-
create
-
_setDelegate
- Overrides:
_setDelegatein classRPObject
-
_setLocal
- Overrides:
_setLocalin classRPObject- Throws:
RPException
-
_process
-
getURLDownloader
- Specified by:
getURLDownloaderin interfaceTorrentManager- Throws:
TorrentException
-
getURLDownloader
public TorrentDownloader getURLDownloader(URL url, String user_name, String password) throws TorrentException - Specified by:
getURLDownloaderin interfaceTorrentManager- Throws:
TorrentException
-
createFromBEncodedFile
Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from a file- Specified by:
createFromBEncodedFilein interfaceTorrentManager- Parameters:
file-- Returns:
- Throws:
TorrentException
-
createFromBEncodedFile
Description copied from interface:TorrentManagerdecodes 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- Specified by:
createFromBEncodedFilein interfaceTorrentManager- Parameters:
file-for_seeding- reduces memory usage by discarding piece hashes- Returns:
- Throws:
TorrentException
-
createFromBEncodedInputStream
Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from an InputStream- Specified by:
createFromBEncodedInputStreamin interfaceTorrentManager- Returns:
- Throws:
TorrentException
-
createFromBEncodedData
Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from a byte array- Specified by:
createFromBEncodedDatain interfaceTorrentManager- Returns:
- Throws:
TorrentException
-
createFromBEncodedData
Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from a byte array- Specified by:
createFromBEncodedDatain interfaceTorrentManager- Parameters:
data-preserve- PRESERVE_* flags- Returns:
- Throws:
TorrentException
-
createFromBEncodedFile
Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from a file- Specified by:
createFromBEncodedFilein interfaceTorrentManager- Parameters:
file-preserve- PRESERVE_* flags- Returns:
- Throws:
TorrentException
-
createFromBEncodedInputStream
public Torrent createFromBEncodedInputStream(InputStream data, int preserve) throws TorrentException Description copied from interface:TorrentManagerdecodes a torrent encoded using the normal "bencoding" rules from an InputStream- Specified by:
createFromBEncodedInputStreamin interfaceTorrentManager- Parameters:
data-preserve- PRESERVE_* flags- Returns:
- Throws:
TorrentException
-
createFromDataFile
Description copied from interface:TorrentManagercreates a new torrent from an input file- Specified by:
createFromDataFilein interfaceTorrentManager- Parameters:
data-- Returns:
- Throws:
TorrentException
-
createFromDataFile
public Torrent createFromDataFile(File data, URL announce_url, boolean include_other_hashes) throws TorrentException - Specified by:
createFromDataFilein interfaceTorrentManager- Throws:
TorrentException
-
createFromDataFileEx
public TorrentCreator createFromDataFileEx(File data, URL announce_url, boolean include_other_hashes) throws TorrentException - Specified by:
createFromDataFileExin interfaceTorrentManager- Throws:
TorrentException
-
getDefinedAttributes
Description copied from interface:TorrentManagerGives 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.- Specified by:
getDefinedAttributesin interfaceTorrentManager- Returns:
-
getAttribute
Description copied from interface:TorrentManagerGives access to the standard built-in attributes- Specified by:
getAttributein interfaceTorrentManager- Parameters:
name-- Returns:
-
getPluginAttribute
Description copied from interface:TorrentManagerGives access to/creates arbitrary String attributes for plugins to use. The attribute will be specific to the plugin, so you can use short torrent names like "name", you won't need to add the plugin ID or any other sort of unique identifier to the attribute name.- Specified by:
getPluginAttributein interfaceTorrentManager- Parameters:
name-- Returns:
-
addListener
- Specified by:
addListenerin interfaceTorrentManager
-
removeListener
- Specified by:
removeListenerin interfaceTorrentManager
-