public final class TorrentMetadata extends MetadataContainer
Represents torrent descriptor file metadata.
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 or sets 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.
|
TorrentFileInfo[] |
getSharedFiles()
Gets the name and version of the program used to create the torrent.
|
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.
|
getKeys
getByType, getMetadataType, readByStringKey
public final String getAnnounce()
Gets the URL of the tracker.
public final void setAnnounce(String value)
Sets the URL of the tracker.
value
- The 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 or sets 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 TorrentFileInfo[] getSharedFiles()
Gets the name and version of the program used to create the torrent.
public final long getPieceLength()
Gets the number of bytes in each piece.
public final byte[] getPieces()
Gets a byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.