|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ecf.protocol.bittorrent.TorrentFactory
public final class TorrentFactory
The TorrentFactory
class allows for the creation of
Torrent
s based on a TorrentFile
with the
createTorrent(TorrentFile)
method.
Method Summary | |
---|---|
static Torrent |
createTorrent(TorrentFile file)
Creates a Torrent from the provided
TorrentFile . |
static Torrent[] |
getSavedTorrents()
Gets all of the torrents that has been opened thus far based on where the state information has been saved as set by TorrentConfiguration.setConfigurationPath(File) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Torrent createTorrent(TorrentFile file) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.io.IOException
Torrent
from the provided
TorrentFile
.
file
- the TorrentFile
to use for instantiation
Torrent
that wraps around the provided file to
allow for exchanging of pieces with peers
java.lang.IllegalArgumentException
- If file
is null
java.lang.IllegalStateException
- If a configuration path has not yet been set via the
TorrentConfiguration.setConfigurationPath(File)
method
java.io.IOException
- If an I/O error error occurs while creating or hooking onto
the files specified by the file
public static Torrent[] getSavedTorrents() throws java.lang.IllegalStateException, java.io.IOException
TorrentConfiguration.setConfigurationPath(File)
. Torrent
s
can have its state information removed via the Torrent.remove()
method, this will prevent it from being returned within this array.
Torrent
s
java.lang.IllegalStateException
- If the configuration path to search for torrents in has not
yet been set
java.io.IOException
- If an I/O error occurs while reading the configuration
information or loading the torrent files
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |