|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.torrent.TorrentManagerImpl
public class TorrentManagerImpl
Field Summary | |
---|---|
protected static CopyOnWriteList<TorrentManagerListener> |
listeners
|
protected PluginInterface |
plugin_interface
|
Fields inherited from interface org.gudy.azureus2.plugins.torrent.TorrentManager |
---|
PRESERVE_ALL, PRESERVE_ENCODING, PRESERVE_NONE |
Constructor Summary | |
---|---|
protected |
TorrentManagerImpl(PluginInterface _pi)
|
Method Summary | |
---|---|
void |
addListener(TorrentManagerListener l)
|
Torrent |
createFromBEncodedData(byte[] data)
decodes a torrent encoded using the normal "bencoding" rules from a byte array |
Torrent |
createFromBEncodedData(byte[] data,
int preserve)
decodes a torrent encoded using the normal "bencoding" rules from a byte array |
Torrent |
createFromBEncodedFile(File file)
decodes a torrent encoded using the normal "bencoding" rules from a file |
Torrent |
createFromBEncodedFile(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. |
Torrent |
createFromBEncodedFile(File file,
int preserve)
decodes a torrent encoded using the normal "bencoding" rules from a file |
Torrent |
createFromBEncodedInputStream(InputStream data)
decodes a torrent encoded using the normal "bencoding" rules from an InputStream |
Torrent |
createFromBEncodedInputStream(InputStream data,
int preserve)
decodes a torrent encoded using the normal "bencoding" rules from an InputStream |
Torrent |
createFromDataFile(File data,
URL announce_url)
creates a new torrent from an input file |
Torrent |
createFromDataFile(File data,
URL announce_url,
boolean include_other_hashes)
|
TorrentCreator |
createFromDataFileEx(File data,
URL announce_url,
boolean include_other_hashes)
|
TorrentAttribute |
getAttribute(String name)
Gives access to the standard built-in attributes |
TorrentAttribute[] |
getDefinedAttributes()
Gives access to the currently defined torrent attributes. |
TorrentAttribute |
getPluginAttribute(String name)
Gives access to/creates arbitrary String attributes for plugins to use. |
static TorrentManagerImpl |
getSingleton()
|
TorrentDownloader |
getURLDownloader(URL url)
|
TorrentDownloader |
getURLDownloader(URL url,
String user_name,
String password)
|
void |
optionsAccepted(TorrentOpenOptions options)
|
void |
optionsAdded(TorrentOpenOptions options)
|
void |
optionsRemoved(TorrentOpenOptions options)
|
void |
removeListener(TorrentManagerListener l)
|
void |
reportCurrentTask(String task_description)
|
void |
reportProgress(int percent_complete)
|
TorrentManager |
specialise(PluginInterface _pi)
|
protected void |
tryToSetDefaultTorrentEncoding(TOTorrent torrent)
|
protected void |
tryToSetTorrentEncoding(TOTorrent torrent,
String encoding)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static CopyOnWriteList<TorrentManagerListener> listeners
protected PluginInterface plugin_interface
Constructor Detail |
---|
protected TorrentManagerImpl(PluginInterface _pi)
Method Detail |
---|
public static TorrentManagerImpl getSingleton()
public TorrentManager specialise(PluginInterface _pi)
public TorrentDownloader getURLDownloader(URL url) throws TorrentException
getURLDownloader
in interface TorrentManager
TorrentException
public TorrentDownloader getURLDownloader(URL url, String user_name, String password) throws TorrentException
getURLDownloader
in interface TorrentManager
TorrentException
public Torrent createFromBEncodedFile(File file) throws TorrentException
TorrentManager
createFromBEncodedFile
in interface TorrentManager
TorrentException
public Torrent createFromBEncodedFile(File file, boolean for_seeding) throws TorrentException
TorrentManager
createFromBEncodedFile
in interface TorrentManager
for_seeding
- reduces memory usage by discarding piece hashes
TorrentException
public Torrent createFromBEncodedInputStream(InputStream data) throws TorrentException
TorrentManager
createFromBEncodedInputStream
in interface TorrentManager
TorrentException
public Torrent createFromBEncodedData(byte[] data) throws TorrentException
TorrentManager
createFromBEncodedData
in interface TorrentManager
TorrentException
public Torrent createFromDataFile(File data, URL announce_url) throws TorrentException
TorrentManager
createFromDataFile
in interface TorrentManager
TorrentException
public Torrent createFromDataFile(File data, URL announce_url, boolean include_other_hashes) throws TorrentException
createFromDataFile
in interface TorrentManager
TorrentException
public TorrentCreator createFromDataFileEx(File data, URL announce_url, boolean include_other_hashes) throws TorrentException
createFromDataFileEx
in interface TorrentManager
TorrentException
public TorrentAttribute[] getDefinedAttributes()
TorrentManager
getDefinedAttributes
in interface TorrentManager
public TorrentAttribute getAttribute(String name)
TorrentManager
getAttribute
in interface TorrentManager
public TorrentAttribute getPluginAttribute(String name)
TorrentManager
getPluginAttribute
in interface TorrentManager
public Torrent createFromBEncodedData(byte[] data, int preserve) throws TorrentException
TorrentManager
createFromBEncodedData
in interface TorrentManager
preserve
- PRESERVE_* flags
TorrentException
public Torrent createFromBEncodedFile(File file, int preserve) throws TorrentException
TorrentManager
createFromBEncodedFile
in interface TorrentManager
preserve
- PRESERVE_* flags
TorrentException
public Torrent createFromBEncodedInputStream(InputStream data, int preserve) throws TorrentException
TorrentManager
createFromBEncodedInputStream
in interface TorrentManager
preserve
- PRESERVE_* flags
TorrentException
public void reportProgress(int percent_complete)
reportProgress
in interface TOTorrentProgressListener
public void reportCurrentTask(String task_description)
reportCurrentTask
in interface TOTorrentProgressListener
protected void tryToSetTorrentEncoding(TOTorrent torrent, String encoding) throws TorrentEncodingException
TorrentEncodingException
protected void tryToSetDefaultTorrentEncoding(TOTorrent torrent) throws TorrentException
TorrentException
public void optionsAdded(TorrentOpenOptions options)
public void optionsAccepted(TorrentOpenOptions options)
public void optionsRemoved(TorrentOpenOptions options)
public void addListener(TorrentManagerListener l)
addListener
in interface TorrentManager
public void removeListener(TorrentManagerListener l)
removeListener
in interface TorrentManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |