Package com.biglybt.core.torrent.impl
Class TOTorrentImpl
- java.lang.Object
-
- com.biglybt.core.logging.LogRelation
-
- com.biglybt.core.torrent.impl.TOTorrentImpl
-
- All Implemented Interfaces:
TOTorrent
- Direct Known Subclasses:
TOTorrentCreateImpl
,TOTorrentDeserialiseImpl
public class TOTorrentImpl extends LogRelation implements TOTorrent
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map
additional_info_properties
private java.util.Map
additional_properties
private TOTorrentAnnounceURLGroupImpl
announce_group
private java.net.URL
announce_url
private byte[]
comment
private boolean
constructing
private boolean
created
private byte[]
created_by
private long
creation_date
private TOTorrentFileImpl[]
files
private boolean
fixed_up_root_hashes
private static CopyOnWriteList<TOTorrentListener>
global_listeners
private java.util.List<TOTorrentListener>
listeners
private int
number_of_pieces
private long
piece_length
private byte[][]
pieces
private boolean
serialising
private boolean
simple_torrent
protected AEMonitor
this_mon
protected static java.util.List
TK_ADDITIONAL_OK_ATTRS
protected static java.lang.String
TK_ANNOUNCE
protected static java.lang.String
TK_ANNOUNCE_LIST
protected static java.lang.String
TK_BEP47_ATTRS
protected static java.lang.String
TK_COMMENT
protected static java.lang.String
TK_COMMENT_UTF8
protected static java.lang.String
TK_CREATED_BY
protected static java.lang.String
TK_CREATION_DATE
protected static java.lang.String
TK_ENCODING
protected static java.lang.String
TK_FILES
protected static java.lang.String
TK_HASH_OVERRIDE
protected static java.lang.String
TK_INFO
protected static java.lang.String
TK_LENGTH
protected static java.lang.String
TK_NAME
protected static java.lang.String
TK_NAME_UTF8
protected static java.lang.String
TK_PATH
protected static java.lang.String
TK_PATH_UTF8
protected static java.lang.String
TK_PIECE_LENGTH
protected static java.lang.String
TK_PIECES
protected static java.lang.String
TK_PRIVATE
protected static java.lang.String
TK_SOURCE
protected static java.lang.String
TK_V2_FILE_TREE
protected static java.lang.String
TK_V2_META_VERSION
protected static java.lang.String
TK_V2_PIECE_LAYERS
protected static java.lang.String
TK_V2_PIECES_ROOT
protected static java.lang.String
TK_WEBSEED_BT
protected static java.lang.String
TK_WEBSEED_GR
private byte[]
torrent_hash
private byte[]
torrent_hash_override
private byte[]
torrent_hash_v1
private byte[]
torrent_hash_v2
private HashWrapper
torrent_hash_wrapper
private HashWrapper
torrent_hash_wrapper_v1
private HashWrapper
torrent_hash_wrapper_v2
private byte[]
torrent_name
private byte[]
torrent_name_utf8
private int
torrent_type
-
Fields inherited from interface com.biglybt.core.torrent.TOTorrent
AZUREUS_PRIVATE_PROPERTIES, AZUREUS_PROPERTIES, DEFAULT_IGNORE_FILES, ENCODING_ACTUALLY_UTF8_KEYS, TT_V1, TT_V1_V2, TT_V2
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TOTorrentImpl()
Constructor for deserialisationprotected
TOTorrentImpl(java.lang.String _torrent_name, java.net.URL _announce_url, boolean _simple_torrent)
Constructor for creation
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAdditionalInfoProperty(java.lang.String name, java.lang.Object value)
protected void
addAdditionalProperty(java.lang.String name, java.lang.Object value)
static void
addGlobalListener(TOTorrentListener listener)
void
addListener(TOTorrentListener l)
protected void
addTorrentAnnounceURLSet(java.net.URL[] urls)
protected java.net.URL
anonymityTransform(java.net.URL url)
protected void
fireChanged(int type)
protected void
fixupRootHashes()
byte[]
getAdditionalByteArrayProperty(java.lang.String name)
protected java.util.Map
getAdditionalInfoProperties()
java.util.List
getAdditionalListProperty(java.lang.String name)
java.lang.Long
getAdditionalLongProperty(java.lang.String name)
java.util.Map
getAdditionalMapProperty(java.lang.String name)
protected java.util.Map
getAdditionalProperties()
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 methodbyte[]
getComment()
Comment is an optional torrent propertybyte[]
getCreatedBy()
long
getCreationDate()
Gets the creation date of the torrent.int
getFileCount()
TOTorrentFileImpl[]
getFiles()
A torrent consists of one or more files.byte[]
getFullHash(int type)
byte[]
getHash()
For a V1 or hybrid torrent this returns the SHA1 hash For a V2 only torrent it returns the truncated SHA256 hashprotected byte[]
getHashOverride()
HashWrapper
getHashWrapper()
convenience method to get a wrapped hash for performance purposesAEMonitor
getMonitor()
byte[]
getName()
Get the name of the torrentint
getNumberOfPieces()
long
getPieceLength()
Returns the piece length used for the torrentbyte[][]
getPieces()
This method provides access to the SHA1/SHA256 hash values (20/32 bytes each) that correspond to the pieces of the torrent.boolean
getPrivate()
java.lang.Object[]
getQueryableInterfaces()
Query this class for a reference to another class that it may holdjava.lang.String
getRelationText()
A short description of what your class holds that can be printed by the loggerprotected boolean
getSimpleTorrent()
long
getSize()
java.lang.String
getSource()
int
getTorrentType()
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 hashboolean
isCreated()
boolean
isDecentralised()
boolean
isExportable()
Is the torrent in a fit state to export and share?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"protected java.lang.String
readStringFromMetaData(byte[] value)
protected java.lang.String
readStringFromMetaData(java.util.Map meta_data, java.lang.String name)
void
removeAdditionalProperties()
remove all additional properties to clear out the torrentvoid
removeAdditionalProperty(java.lang.String name)
static void
removeGlobalListener(TOTorrentListener listener)
void
removeListener(TOTorrentListener l)
TOTorrent
selectHybridHashType(int type)
void
serialiseToBEncodedFile(java.io.File output_file)
This method will serialise a torrent using the standard "b-encoding" mechanism into a fileprotected byte[]
serialiseToByteArray()
java.util.Map
serialiseToMap()
This method will serialise a torrent into a Map consistent with that used by the "b-encoding" routines defined elsewherevoid
serialiseToXMLFile(java.io.File file)
This method will serialise a torrent using an XML encoding to a filevoid
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 userboolean
setAnnounceURL(java.net.URL url)
protected void
setComment(byte[] _comment)
void
setComment(java.lang.String _comment)
protected void
setConstructed()
void
setCreatedBy(byte[] _created_by)
protected void
setCreatedBy(java.lang.String _created_by)
void
setCreationDate(long _creation_date)
protected void
setFiles(TOTorrentFileImpl[] _files)
protected void
setHashFromInfo(java.util.Map info)
void
setHashOverride(byte[] hash)
protected void
setName(byte[] _name)
protected void
setNameUTF8(byte[] _name)
protected void
setPiece(int index, byte[] piece)
protected void
setPieceLength(long _length)
void
setPieces(byte[][] _pieces)
This method exists to support the temporary discarding of piece hashes to conserver memory.void
setPrivate(boolean _private_torrent)
Note - changing the private attribute CHANGES THE TORRENT HASHprotected void
setSimpleTorrent(boolean _simple_torrent)
void
setSource(java.lang.String str)
Note - changing the source CHANGES THE TORRENT HASHprotected void
setTorrentType(int type)
boolean
updateExportability(TOTorrent from)
Propagate exportability from another torrent to this one - has to have same hash.protected byte[]
writeStringToMetaData(java.lang.String value)
protected void
writeStringToMetaData(java.util.Map meta_data, java.lang.String name, java.lang.String value)
-
Methods inherited from class com.biglybt.core.logging.LogRelation
propogatedRelationText, queryForClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.core.torrent.TOTorrent
getEffectiveTorrentType, getTruncatedHash
-
-
-
-
Field Detail
-
TK_ANNOUNCE
protected static final java.lang.String TK_ANNOUNCE
- See Also:
- Constant Field Values
-
TK_ANNOUNCE_LIST
protected static final java.lang.String TK_ANNOUNCE_LIST
- See Also:
- Constant Field Values
-
TK_COMMENT
protected static final java.lang.String TK_COMMENT
- See Also:
- Constant Field Values
-
TK_CREATION_DATE
protected static final java.lang.String TK_CREATION_DATE
- See Also:
- Constant Field Values
-
TK_CREATED_BY
protected static final java.lang.String TK_CREATED_BY
- See Also:
- Constant Field Values
-
TK_INFO
protected static final java.lang.String TK_INFO
- See Also:
- Constant Field Values
-
TK_NAME
protected static final java.lang.String TK_NAME
- See Also:
- Constant Field Values
-
TK_LENGTH
protected static final java.lang.String TK_LENGTH
- See Also:
- Constant Field Values
-
TK_PATH
protected static final java.lang.String TK_PATH
- See Also:
- Constant Field Values
-
TK_FILES
protected static final java.lang.String TK_FILES
- See Also:
- Constant Field Values
-
TK_PIECE_LENGTH
protected static final java.lang.String TK_PIECE_LENGTH
- See Also:
- Constant Field Values
-
TK_PIECES
protected static final java.lang.String TK_PIECES
- See Also:
- Constant Field Values
-
TK_PRIVATE
protected static final java.lang.String TK_PRIVATE
- See Also:
- Constant Field Values
-
TK_SOURCE
protected static final java.lang.String TK_SOURCE
- See Also:
- Constant Field Values
-
TK_NAME_UTF8
protected static final java.lang.String TK_NAME_UTF8
- See Also:
- Constant Field Values
-
TK_PATH_UTF8
protected static final java.lang.String TK_PATH_UTF8
- See Also:
- Constant Field Values
-
TK_COMMENT_UTF8
protected static final java.lang.String TK_COMMENT_UTF8
- See Also:
- Constant Field Values
-
TK_WEBSEED_BT
protected static final java.lang.String TK_WEBSEED_BT
- See Also:
- Constant Field Values
-
TK_WEBSEED_GR
protected static final java.lang.String TK_WEBSEED_GR
- See Also:
- Constant Field Values
-
TK_HASH_OVERRIDE
protected static final java.lang.String TK_HASH_OVERRIDE
- See Also:
- Constant Field Values
-
TK_ENCODING
protected static final java.lang.String TK_ENCODING
- See Also:
- Constant Field Values
-
TK_ADDITIONAL_OK_ATTRS
protected static final java.util.List TK_ADDITIONAL_OK_ATTRS
-
TK_BEP47_ATTRS
protected static final java.lang.String TK_BEP47_ATTRS
- See Also:
- Constant Field Values
-
TK_V2_META_VERSION
protected static final java.lang.String TK_V2_META_VERSION
- See Also:
- Constant Field Values
-
TK_V2_FILE_TREE
protected static final java.lang.String TK_V2_FILE_TREE
- See Also:
- Constant Field Values
-
TK_V2_PIECE_LAYERS
protected static final java.lang.String TK_V2_PIECE_LAYERS
- See Also:
- Constant Field Values
-
TK_V2_PIECES_ROOT
protected static final java.lang.String TK_V2_PIECES_ROOT
- See Also:
- Constant Field Values
-
global_listeners
private static CopyOnWriteList<TOTorrentListener> global_listeners
-
torrent_type
private int torrent_type
-
torrent_name
private byte[] torrent_name
-
torrent_name_utf8
private byte[] torrent_name_utf8
-
comment
private byte[] comment
-
announce_url
private java.net.URL announce_url
-
announce_group
private final TOTorrentAnnounceURLGroupImpl announce_group
-
piece_length
private long piece_length
-
pieces
private byte[][] pieces
-
number_of_pieces
private int number_of_pieces
-
torrent_hash_override
private byte[] torrent_hash_override
-
torrent_hash
private byte[] torrent_hash
-
torrent_hash_wrapper
private HashWrapper torrent_hash_wrapper
-
torrent_hash_v1
private byte[] torrent_hash_v1
-
torrent_hash_wrapper_v1
private HashWrapper torrent_hash_wrapper_v1
-
torrent_hash_v2
private byte[] torrent_hash_v2
-
torrent_hash_wrapper_v2
private HashWrapper torrent_hash_wrapper_v2
-
simple_torrent
private boolean simple_torrent
-
files
private TOTorrentFileImpl[] files
-
creation_date
private long creation_date
-
created_by
private byte[] created_by
-
additional_properties
private java.util.Map additional_properties
-
additional_info_properties
private final java.util.Map additional_info_properties
-
created
private boolean created
-
serialising
private boolean serialising
-
listeners
private java.util.List<TOTorrentListener> listeners
-
this_mon
protected final AEMonitor this_mon
-
constructing
private boolean constructing
-
fixed_up_root_hashes
private boolean fixed_up_root_hashes
-
-
Method Detail
-
addGlobalListener
public static void addGlobalListener(TOTorrentListener listener)
-
removeGlobalListener
public static void removeGlobalListener(TOTorrentListener listener)
-
setConstructed
protected void setConstructed() throws TOTorrentException
- Throws:
TOTorrentException
-
fixupRootHashes
protected void fixupRootHashes()
-
serialiseToBEncodedFile
public void serialiseToBEncodedFile(java.io.File output_file) throws TOTorrentException
Description copied from interface:TOTorrent
This method will serialise a torrent using the standard "b-encoding" mechanism into a file- Specified by:
serialiseToBEncodedFile
in interfaceTOTorrent
- Throws:
TOTorrentException
-
serialiseToByteArray
protected byte[] serialiseToByteArray() throws TOTorrentException
- Throws:
TOTorrentException
-
serialiseToMap
public java.util.Map serialiseToMap() throws TOTorrentException
Description copied from interface:TOTorrent
This method will serialise a torrent into a Map consistent with that used by the "b-encoding" routines defined elsewhere- Specified by:
serialiseToMap
in interfaceTOTorrent
- Returns:
- Throws:
TOTorrentException
-
serialiseToXMLFile
public void serialiseToXMLFile(java.io.File file) throws TOTorrentException
Description copied from interface:TOTorrent
This method will serialise a torrent using an XML encoding to a file- Specified by:
serialiseToXMLFile
in interfaceTOTorrent
- Throws:
TOTorrentException
-
getTorrentType
public int getTorrentType()
- Specified by:
getTorrentType
in interfaceTOTorrent
- Returns:
- One of the TT_ constants
-
setTorrentType
protected void setTorrentType(int type)
-
isExportable
public boolean isExportable()
Description copied from interface:TOTorrent
Is the torrent in a fit state to export and share?- Specified by:
isExportable
in interfaceTOTorrent
- Returns:
-
updateExportability
public boolean updateExportability(TOTorrent from)
Description copied from interface:TOTorrent
Propagate exportability from another torrent to this one - has to have same hash. Required because an internal torrent can become exportable whilst the 'saved' (unexportable) original torrent is sitting there untouched...- Specified by:
updateExportability
in interfaceTOTorrent
- Returns:
-
getName
public byte[] getName()
Description copied from interface:TOTorrent
Get the name of the torrent
-
setName
protected void setName(byte[] _name)
-
getUTF8Name
public java.lang.String getUTF8Name()
Description copied from interface:TOTorrent
Retrieves the utf8 name of the torrent ONLY if the torrent specified one in it's info map. Otherwise, returns null (you'll have to use getName() and decode it yourself)- Specified by:
getUTF8Name
in interfaceTOTorrent
-
setNameUTF8
protected void setNameUTF8(byte[] _name)
-
isSimpleTorrent
public boolean isSimpleTorrent()
Description copied from interface:TOTorrent
A "simple torrent" is one that consists of a single file on its own (i.e. not in a nested directory).- Specified by:
isSimpleTorrent
in interfaceTOTorrent
- Returns:
-
getComment
public byte[] getComment()
Description copied from interface:TOTorrent
Comment is an optional torrent property- Specified by:
getComment
in interfaceTOTorrent
- Returns:
-
setComment
protected void setComment(byte[] _comment)
-
setComment
public void setComment(java.lang.String _comment)
- Specified by:
setComment
in interfaceTOTorrent
-
getAnnounceURL
public java.net.URL getAnnounceURL()
Description copied from interface:TOTorrent
A torrent must have a URL that identifies the tracker. This method returns it. However an extension to this exists to allow multiple trackers, and their backups, to be defined. See below- Specified by:
getAnnounceURL
in interfaceTOTorrent
- Returns:
-
setAnnounceURL
public boolean setAnnounceURL(java.net.URL url)
- Specified by:
setAnnounceURL
in interfaceTOTorrent
- Returns:
- true-changed; false-not changed
-
isDecentralised
public boolean isDecentralised()
- Specified by:
isDecentralised
in interfaceTOTorrent
-
getCreationDate
public long getCreationDate()
Description copied from interface:TOTorrent
Gets the creation date of the torrent. Optional property, 0 returned if not set- Specified by:
getCreationDate
in interfaceTOTorrent
- Returns:
-
setCreationDate
public void setCreationDate(long _creation_date)
- Specified by:
setCreationDate
in interfaceTOTorrent
-
setCreatedBy
public void setCreatedBy(byte[] _created_by)
- Specified by:
setCreatedBy
in interfaceTOTorrent
-
setCreatedBy
protected void setCreatedBy(java.lang.String _created_by)
-
getCreatedBy
public byte[] getCreatedBy()
- Specified by:
getCreatedBy
in interfaceTOTorrent
-
getHash
public byte[] getHash() throws TOTorrentException
Description copied from interface:TOTorrent
For a V1 or hybrid torrent this returns the SHA1 hash For a V2 only torrent it returns the truncated SHA256 hash- Specified by:
getHash
in interfaceTOTorrent
- Returns:
- Throws:
TOTorrentException
-
getFullHash
public byte[] getFullHash(int type) throws TOTorrentException
- Specified by:
getFullHash
in interfaceTOTorrent
- Returns:
- SHA1 hash for v1/hybrid torrents, SHA256 hash for hybrid/v2 torrents
- Throws:
TOTorrentException
-
getHashWrapper
public HashWrapper getHashWrapper() throws TOTorrentException
Description copied from interface:TOTorrent
convenience method to get a wrapped hash for performance purposes- Specified by:
getHashWrapper
in interfaceTOTorrent
- Returns:
- Throws:
TOTorrentException
-
hasSameHashAs
public boolean hasSameHashAs(TOTorrent other)
Description copied from interface:TOTorrent
compares two torrents by hash- Specified by:
hasSameHashAs
in interfaceTOTorrent
- Returns:
-
setHashFromInfo
protected void setHashFromInfo(java.util.Map info) throws TOTorrentException
- Throws:
TOTorrentException
-
selectHybridHashType
public TOTorrent selectHybridHashType(int type) throws TOTorrentException
- Specified by:
selectHybridHashType
in interfaceTOTorrent
- Throws:
TOTorrentException
-
setHashOverride
public void setHashOverride(byte[] hash) throws TOTorrentException
- Specified by:
setHashOverride
in interfaceTOTorrent
- Throws:
TOTorrentException
-
getHashOverride
protected byte[] getHashOverride()
-
setPrivate
public void setPrivate(boolean _private_torrent) throws TOTorrentException
Description copied from interface:TOTorrent
Note - changing the private attribute CHANGES THE TORRENT HASH- Specified by:
setPrivate
in interfaceTOTorrent
- Throws:
TOTorrentException
-
getPrivate
public boolean getPrivate()
- Specified by:
getPrivate
in interfaceTOTorrent
-
setSource
public void setSource(java.lang.String str) throws TOTorrentException
Description copied from interface:TOTorrent
Note - changing the source CHANGES THE TORRENT HASH- Specified by:
setSource
in interfaceTOTorrent
- Throws:
TOTorrentException
-
getAnnounceURLGroup
public TOTorrentAnnounceURLGroup getAnnounceURLGroup()
Description copied from interface:TOTorrent
When a group of sets of trackers is defined their URLs are accessed via this method- Specified by:
getAnnounceURLGroup
in interfaceTOTorrent
- Returns:
- the group, always present, which may have 0 members
-
addTorrentAnnounceURLSet
protected void addTorrentAnnounceURLSet(java.net.URL[] urls)
-
getPieceLength
public long getPieceLength()
Description copied from interface:TOTorrent
Returns the piece length used for the torrent- Specified by:
getPieceLength
in interfaceTOTorrent
- Returns:
-
setPieceLength
protected void setPieceLength(long _length)
-
getNumberOfPieces
public int getNumberOfPieces()
- Specified by:
getNumberOfPieces
in interfaceTOTorrent
-
getPieces
public byte[][] getPieces()
Description copied from interface:TOTorrent
This method provides access to the SHA1/SHA256 hash values (20/32 bytes each) that correspond to the pieces of the torrent.
-
setPieces
public void setPieces(byte[][] _pieces)
Description copied from interface:TOTorrent
This method exists to support the temporary discarding of piece hashes to conserver memory. It should only be used with care!
-
setPiece
protected void setPiece(int index, byte[] piece)
-
getFileCount
public int getFileCount()
- Specified by:
getFileCount
in interfaceTOTorrent
-
getFiles
public TOTorrentFileImpl[] getFiles()
Description copied from interface:TOTorrent
A torrent consists of one or more files. These are accessed via this method.
-
setFiles
protected void setFiles(TOTorrentFileImpl[] _files)
-
getSimpleTorrent
protected boolean getSimpleTorrent()
-
setSimpleTorrent
protected void setSimpleTorrent(boolean _simple_torrent)
-
getAdditionalProperties
protected java.util.Map getAdditionalProperties()
-
setAdditionalStringProperty
public void setAdditionalStringProperty(java.lang.String name, java.lang.String value)
Description copied from interface:TOTorrent
The additional properties are used for holding non-core data for Azureus' own user- Specified by:
setAdditionalStringProperty
in interfaceTOTorrent
- Parameters:
name
- name of the property (e.g. "encoding")value
- value. This will be encoded with default encoding
-
getAdditionalStringProperty
public java.lang.String getAdditionalStringProperty(java.lang.String name)
- Specified by:
getAdditionalStringProperty
in interfaceTOTorrent
-
setAdditionalByteArrayProperty
public void setAdditionalByteArrayProperty(java.lang.String name, byte[] value)
- Specified by:
setAdditionalByteArrayProperty
in interfaceTOTorrent
-
setAdditionalProperty
public void setAdditionalProperty(java.lang.String name, java.lang.Object value)
Description copied from interface:TOTorrent
set an arbitrary property. Make sure its compatible with bencoding!- Specified by:
setAdditionalProperty
in interfaceTOTorrent
-
getAdditionalByteArrayProperty
public byte[] getAdditionalByteArrayProperty(java.lang.String name)
- Specified by:
getAdditionalByteArrayProperty
in interfaceTOTorrent
-
setAdditionalLongProperty
public void setAdditionalLongProperty(java.lang.String name, java.lang.Long value)
- Specified by:
setAdditionalLongProperty
in interfaceTOTorrent
-
getAdditionalLongProperty
public java.lang.Long getAdditionalLongProperty(java.lang.String name)
- Specified by:
getAdditionalLongProperty
in interfaceTOTorrent
-
setAdditionalListProperty
public void setAdditionalListProperty(java.lang.String name, java.util.List value)
- Specified by:
setAdditionalListProperty
in interfaceTOTorrent
-
getAdditionalListProperty
public java.util.List getAdditionalListProperty(java.lang.String name)
- Specified by:
getAdditionalListProperty
in interfaceTOTorrent
-
setAdditionalMapProperty
public void setAdditionalMapProperty(java.lang.String name, java.util.Map value)
- Specified by:
setAdditionalMapProperty
in interfaceTOTorrent
-
getAdditionalMapProperty
public java.util.Map getAdditionalMapProperty(java.lang.String name)
- Specified by:
getAdditionalMapProperty
in interfaceTOTorrent
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String name)
- Specified by:
getAdditionalProperty
in interfaceTOTorrent
-
removeAdditionalProperty
public void removeAdditionalProperty(java.lang.String name)
- Specified by:
removeAdditionalProperty
in interfaceTOTorrent
-
removeAdditionalProperties
public void removeAdditionalProperties()
Description copied from interface:TOTorrent
remove all additional properties to clear out the torrent- Specified by:
removeAdditionalProperties
in interfaceTOTorrent
-
addAdditionalProperty
protected void addAdditionalProperty(java.lang.String name, java.lang.Object value)
-
addAdditionalInfoProperty
protected void addAdditionalInfoProperty(java.lang.String name, java.lang.Object value)
-
getAdditionalInfoProperties
protected java.util.Map getAdditionalInfoProperties()
-
readStringFromMetaData
protected java.lang.String readStringFromMetaData(java.util.Map meta_data, java.lang.String name)
-
readStringFromMetaData
protected java.lang.String readStringFromMetaData(byte[] value)
-
writeStringToMetaData
protected void writeStringToMetaData(java.util.Map meta_data, java.lang.String name, java.lang.String value)
-
writeStringToMetaData
protected byte[] writeStringToMetaData(java.lang.String value)
-
anonymityTransform
protected java.net.URL anonymityTransform(java.net.URL url)
-
print
public void print()
Description copied from interface:TOTorrent
A diagnostic method for dumping the tracker contents to "stdout"
-
fireChanged
protected void fireChanged(int type)
-
addListener
public void addListener(TOTorrentListener l)
- Specified by:
addListener
in interfaceTOTorrent
-
removeListener
public void removeListener(TOTorrentListener l)
- Specified by:
removeListener
in interfaceTOTorrent
-
getMonitor
public AEMonitor getMonitor()
- Specified by:
getMonitor
in interfaceTOTorrent
-
getRelationText
public java.lang.String getRelationText()
Description copied from class:LogRelation
A short description of what your class holds that can be printed by the logger- Overrides:
getRelationText
in classLogRelation
- Returns:
-
getQueryableInterfaces
public java.lang.Object[] getQueryableInterfaces()
Description copied from class:LogRelation
Query this class for a reference to another class that it may hold- Overrides:
getQueryableInterfaces
in classLogRelation
- Returns:
- If found, the class desired. Otherwise, null.
-
-