public final class TorrentPackage extends CustomPackage
Represents torrent descriptor file metadata.
Please find more information at <a href="https://en.wikipedia.org/wiki/Torrent_file">https://en.wikipedia.org/wiki/Torrent_file</a>
.
Learn more
Modifier and Type | Method and Description |
---|---|
String |
getAnnounce()
Gets the URL of the tracker.
|
String |
getComment()
Gets the author's comment.
|
String |
getCreatedBy()
Gets the name and version of the program used to create the torrent.
|
Date |
getCreationDate()
Gets the creation date of the torrent.
|
long |
getPieceLength()
Gets the number of bytes in each piece.
|
byte[] |
getPieces()
Gets a byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.
|
TorrentSharedFilePackage[] |
getSharedFiles()
Gets an array containing shared file information entries.
|
void |
setAnnounce(String value)
Sets the URL of the tracker.
|
void |
setComment(String value)
Sets the author's comment.
|
void |
setCreatedBy(String value)
Sets the name and version of the program used to create the torrent.
|
void |
setCreationDate(Date value)
Sets the creation date of the torrent.
|
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, sanitize, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final String getAnnounce()
Gets the URL of the tracker.
public final void setAnnounce(String value)
Sets the URL of the tracker.
value
- The URL of the tracker.public final String getComment()
Gets the author's comment.
public final void setComment(String value)
Sets the author's comment.
value
- The author's comment.public final Date getCreationDate()
Gets the creation date of the torrent.
public final void setCreationDate(Date value)
Sets the creation date of the torrent.
value
- The creation date of the torrent.public final String getCreatedBy()
Gets the name and version of the program used to create the torrent.
public final void setCreatedBy(String value)
Sets the name and version of the program used to create the torrent.
value
- The name and version of the program used to create the torrent.public final TorrentSharedFilePackage[] getSharedFiles()
Gets an array containing shared file information entries.
public final long getPieceLength()
Gets the number of bytes in each piece. For more information please see .
Pieces
public final byte[] getPieces()
Gets a byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.