| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Torrent
| Method Summary | |
|---|---|
 java.lang.Object | 
getAdditionalProperty(java.lang.String name)
Access to top-level properties in the torrent  | 
 java.net.URL | 
getAnnounceURL()
 | 
 TorrentAnnounceURLList | 
getAnnounceURLList()
get the announce list for multi-tracker torrents.  | 
 Torrent | 
getClone()
 | 
 java.lang.String | 
getComment()
 | 
 java.lang.String | 
getCreatedBy()
 | 
 long | 
getCreationDate()
UNIX epoch format in seconds  | 
 java.lang.String | 
getEncoding()
 | 
 TorrentFile[] | 
getFiles()
 | 
 byte[] | 
getHash()
 | 
 java.net.URL | 
getMagnetURI()
Gets the magnet URI for the torrent - throws exception if not available  | 
 java.util.Map | 
getMapProperty(java.lang.String name)
Gets a previously set map value  | 
 java.lang.String | 
getName()
 | 
 long | 
getPieceCount()
 | 
 byte[][] | 
getPieces()
 | 
 long | 
getPieceSize()
 | 
 java.lang.String | 
getPluginStringProperty(java.lang.String name)
Get a property specific to this plugin  | 
 long | 
getSize()
If size is 0 then this is an "external" torrent and we only know its hash (and name constructed from hash).  | 
 boolean | 
isComplete()
 | 
 boolean | 
isDecentralised()
A decentralised torrent uses the DHT only as a "tracker"  | 
 boolean | 
isDecentralisedBackupEnabled()
Decentralised backup permits the DHT to be used as a tracker when the "real" tracker is unavailable  | 
 boolean | 
isDecentralisedBackupRequested()
 | 
 boolean | 
isPrivate()
A private torrent is either explicitly private via info/private or has decentralised backup disabled and peer exchange disabled  | 
 boolean | 
isSimpleTorrent()
Returns true if the torrent is a single file torrent, false if it is a multi file torrent.  | 
 Torrent | 
removeAdditionalProperties()
Removal all non-standard properties (excluding plugin-properties below)  | 
 void | 
save()
Saves the torrent to its persistent location  | 
 void | 
setAnnounceURL(java.net.URL url)
 | 
 void | 
setComment(java.lang.String comment)
 | 
 void | 
setComplete(java.io.File data_dir)
sets the torrent complete - i.e.  | 
 void | 
setDecentralisedBackupRequested(boolean requested)
By default torrents with OK trackers are not tracked in the DHT.  | 
 void | 
setDefaultEncoding()
 | 
 void | 
setEncoding(java.lang.String encoding)
 | 
 void | 
setMapProperty(java.lang.String name,
               java.util.Map value)
Sets a map property in the torrent, retrievable via getMapProperty  | 
 void | 
setPluginStringProperty(java.lang.String name,
                        java.lang.String value)
Set a property specific to this plugin  | 
 void | 
setPrivate(boolean priv)
 | 
 boolean | 
wasCreatedByUs()
 | 
 byte[] | 
writeToBEncodedData()
 | 
 void | 
writeToFile(java.io.File file)
 | 
 java.util.Map | 
writeToMap()
 | 
| Method Detail | 
|---|
java.lang.String getName()
java.net.URL getAnnounceURL()
void setAnnounceURL(java.net.URL url)
TorrentAnnounceURLList getAnnounceURLList()
byte[] getHash()
long getSize()
java.lang.String getComment()
void setComment(java.lang.String comment)
long getCreationDate()
java.lang.String getCreatedBy()
long getPieceSize()
long getPieceCount()
byte[][] getPieces()
TorrentFile[] getFiles()
java.lang.String getEncoding()
void setEncoding(java.lang.String encoding)
                 throws TorrentEncodingException
TorrentEncodingException
void setDefaultEncoding()
                        throws TorrentEncodingException
TorrentEncodingExceptionjava.lang.Object getAdditionalProperty(java.lang.String name)
name - 
Torrent removeAdditionalProperties()
void setPluginStringProperty(java.lang.String name,
                             java.lang.String value)
name - value - java.lang.String getPluginStringProperty(java.lang.String name)
name - 
void setMapProperty(java.lang.String name,
                    java.util.Map value)
name - should be unique across plugins (i.e. prefix it with something unique)value - bencodable Map valuejava.util.Map getMapProperty(java.lang.String name)
name - should be unique across plugins (i.e. prefix it with something unique)
setMapPropertyboolean isDecentralised()
boolean isDecentralisedBackupEnabled()
void setDecentralisedBackupRequested(boolean requested)
requested - boolean isDecentralisedBackupRequested()
boolean isPrivate()
void setPrivate(boolean priv)
boolean wasCreatedByUs()
java.net.URL getMagnetURI()
                          throws TorrentException
TorrentException
java.util.Map writeToMap()
                         throws TorrentException
TorrentException
void writeToFile(java.io.File file)
                 throws TorrentException
TorrentException
byte[] writeToBEncodedData()
                           throws TorrentException
TorrentException
void save()
          throws TorrentException
TorrentException
void setComplete(java.io.File data_dir)
                 throws TorrentException
data_dir - 
TorrentExceptionboolean isComplete()
boolean isSimpleTorrent()
Torrent getClone()
                 throws TorrentException
TorrentException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||