|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TOTorrent
Field Summary | |
---|---|
static java.lang.String |
AZUREUS_PRIVATE_PROPERTIES
These ones are *not* exportable to the world |
static java.lang.String |
AZUREUS_PROPERTIES
A Map additional property defined for holding AZ specific properties that are deemed to be exportable to the world |
static java.lang.String |
DEFAULT_IGNORE_FILES
|
static java.lang.String |
ENCODING_ACTUALLY_UTF8_KEYS
|
Method Summary | |
---|---|
void |
addListener(TOTorrentListener l)
|
byte[] |
getAdditionalByteArrayProperty(java.lang.String name)
|
java.util.List |
getAdditionalListProperty(java.lang.String name)
|
java.lang.Long |
getAdditionalLongProperty(java.lang.String name)
|
java.util.Map |
getAdditionalMapProperty(java.lang.String name)
|
java.lang.Object |
getAdditionalProperty(java.lang.String name)
|
java.lang.String |
getAdditionalStringProperty(java.lang.String name)
|
java.net.URL |
getAnnounceURL()
A torrent must have a URL that identifies the tracker. |
TOTorrentAnnounceURLGroup |
getAnnounceURLGroup()
When a group of sets of trackers is defined their URLs are accessed via this method |
byte[] |
getComment()
Comment is an optional torrent property |
byte[] |
getCreatedBy()
|
long |
getCreationDate()
Gets the creation date of the torrent. |
int |
getFileCount()
|
TOTorrentFile[] |
getFiles()
A torrent consists of one or more files. |
byte[] |
getHash()
A torrent has a unique SHA1 (20 byte) hash that is computed from some of its contents. |
HashWrapper |
getHashWrapper()
convenience method to get a wrapped hash for performance purposes |
AEMonitor |
getMonitor()
|
byte[] |
getName()
Get the name of the torrent |
int |
getNumberOfPieces()
|
long |
getPieceLength()
Returns the piece length used for the torrent |
byte[][] |
getPieces()
|
boolean |
getPrivate()
|
long |
getSize()
|
java.lang.String |
getUTF8Name()
Retrieves the utf8 name of the torrent ONLY if the torrent specified one in it's info map. |
boolean |
hasSameHashAs(TOTorrent other)
compares two torrents by hash |
boolean |
isCreated()
|
boolean |
isDecentralised()
This method provides access to the SHA1 hash values (20 bytes each) that correspond to the pieces of the torrent. |
boolean |
isSimpleTorrent()
A "simple torrent" is one that consists of a single file on its own (i.e. |
void |
print()
A diagnostic method for dumping the tracker contents to "stdout" |
void |
removeAdditionalProperties()
remove all additional properties to clear out the torrent |
void |
removeAdditionalProperty(java.lang.String name)
|
void |
removeListener(TOTorrentListener l)
|
void |
serialiseToBEncodedFile(java.io.File file)
This method will serialise a torrent using the standard "b-encoding" mechanism into a file |
java.util.Map |
serialiseToMap()
This method will serialise a torrent into a Map consistent with that used by the "b-encoding" routines defined elsewhere |
void |
serialiseToXMLFile(java.io.File file)
This method will serialise a torrent using an XML encoding to a file |
void |
setAdditionalByteArrayProperty(java.lang.String name,
byte[] value)
|
void |
setAdditionalListProperty(java.lang.String name,
java.util.List value)
|
void |
setAdditionalLongProperty(java.lang.String name,
java.lang.Long value)
|
void |
setAdditionalMapProperty(java.lang.String name,
java.util.Map value)
|
void |
setAdditionalProperty(java.lang.String name,
java.lang.Object value)
set an arbitrary property. |
void |
setAdditionalStringProperty(java.lang.String name,
java.lang.String value)
The additional properties are used for holding non-core data for Azureus' own user |
boolean |
setAnnounceURL(java.net.URL url)
|
void |
setComment(java.lang.String comment)
|
void |
setCreatedBy(byte[] cb)
|
void |
setCreationDate(long date)
|
void |
setHashOverride(byte[] hash)
Only supported for decentralised torrents, allows an alternative hash to be used for them in the DHT |
void |
setPieces(byte[][] pieces)
This method exists to support the temporary discarding of piece hashes to conserver memory. |
void |
setPrivate(boolean _private)
Note - changing the private attribute CHANGES THE TORRENT HASH |
Field Detail |
---|
static final java.lang.String DEFAULT_IGNORE_FILES
static final java.lang.String AZUREUS_PROPERTIES
static final java.lang.String AZUREUS_PRIVATE_PROPERTIES
static final java.lang.String ENCODING_ACTUALLY_UTF8_KEYS
Method Detail |
---|
byte[] getName()
boolean isSimpleTorrent()
byte[] getComment()
void setComment(java.lang.String comment)
long getCreationDate()
void setCreationDate(long date)
byte[] getCreatedBy()
void setCreatedBy(byte[] cb)
boolean isCreated()
java.net.URL getAnnounceURL()
boolean setAnnounceURL(java.net.URL url)
url
-
TOTorrentAnnounceURLGroup getAnnounceURLGroup()
boolean isDecentralised()
can
- fail if re-reading of piece hashes for space spacing failsbyte[][] getPieces() throws TOTorrentException
TOTorrentException
void setPieces(byte[][] pieces) throws TOTorrentException
pieces
-
TOTorrentException
long getPieceLength()
int getNumberOfPieces()
long getSize()
int getFileCount()
TOTorrentFile[] getFiles()
byte[] getHash() throws TOTorrentException
TOTorrentException
HashWrapper getHashWrapper() throws TOTorrentException
TOTorrentException
void setHashOverride(byte[] hash) throws TOTorrentException
hash
-
TOTorrentException
boolean hasSameHashAs(TOTorrent other)
other
-
boolean getPrivate()
void setPrivate(boolean _private) throws TOTorrentException
_private
-
TOTorrentException
void setAdditionalStringProperty(java.lang.String name, java.lang.String value)
name
- name of the property (e.g. "encoding")value
- value. This will be encoded with default encodingjava.lang.String getAdditionalStringProperty(java.lang.String name)
void setAdditionalByteArrayProperty(java.lang.String name, byte[] value)
byte[] getAdditionalByteArrayProperty(java.lang.String name)
void setAdditionalLongProperty(java.lang.String name, java.lang.Long value)
java.lang.Long getAdditionalLongProperty(java.lang.String name)
void setAdditionalListProperty(java.lang.String name, java.util.List value)
java.util.List getAdditionalListProperty(java.lang.String name)
void setAdditionalMapProperty(java.lang.String name, java.util.Map value)
java.util.Map getAdditionalMapProperty(java.lang.String name)
java.lang.Object getAdditionalProperty(java.lang.String name)
void setAdditionalProperty(java.lang.String name, java.lang.Object value)
void removeAdditionalProperty(java.lang.String name)
void removeAdditionalProperties()
void serialiseToBEncodedFile(java.io.File file) throws TOTorrentException
file
-
TOTorrentException
java.util.Map serialiseToMap() throws TOTorrentException
TOTorrentException
void serialiseToXMLFile(java.io.File file) throws TOTorrentException
file
-
TOTorrentException
void addListener(TOTorrentListener l)
void removeListener(TOTorrentListener l)
AEMonitor getMonitor()
void print()
java.lang.String getUTF8Name()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |