TorrentPackage

Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage

public final class TorrentPackage extends CustomPackage

Represents torrent descriptor file metadata. Please find more information at https://en.wikipedia.org/wiki/Torrent_file .

Learn more

Methods

Method Description
getAnnounce() Gets the URL of the tracker.
setAnnounce(String value) Sets the URL of the tracker.
getComment() Gets the author’s comment.
setComment(String value) Sets the author’s comment.
getCreationDate() Gets the creation date of the torrent.
setCreationDate(Date value) Sets the creation date of the torrent.
getCreatedBy() Gets the name and version of the program used to create the torrent.
setCreatedBy(String value) Sets the name and version of the program used to create the torrent.
getSharedFiles() Gets an array containing shared file information entries.
getPieceLength() Gets the number of bytes in each piece.
getPieces() Gets a byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.

getAnnounce()

public final String getAnnounce()

Gets the URL of the tracker.

Returns: java.lang.String - The URL of the tracker.

setAnnounce(String value)

public final void setAnnounce(String value)

Sets the URL of the tracker.

Parameters:

Parameter Type Description
value java.lang.String The URL of the tracker.

getComment()

public final String getComment()

Gets the author’s comment.

Returns: java.lang.String - The author’s comment.

setComment(String value)

public final void setComment(String value)

Sets the author’s comment.

Parameters:

Parameter Type Description
value java.lang.String The author’s comment.

getCreationDate()

public final Date getCreationDate()

Gets the creation date of the torrent.

Returns: java.util.Date - The creation date of the torrent.

setCreationDate(Date value)

public final void setCreationDate(Date value)

Sets the creation date of the torrent.

Parameters:

Parameter Type Description
value java.util.Date The creation date of the torrent.

getCreatedBy()

public final String getCreatedBy()

Gets the name and version of the program used to create the torrent.

Returns: java.lang.String - The name and version of the program used to create the torrent.

setCreatedBy(String value)

public final void setCreatedBy(String value)

Sets the name and version of the program used to create the torrent.

Parameters:

Parameter Type Description
value java.lang.String The name and version of the program used to create the torrent.

getSharedFiles()

public final TorrentSharedFilePackage[] getSharedFiles()

Gets an array containing shared file information entries.

Returns: com.groupdocs.metadata.core.TorrentSharedFilePackage[] - An array containing shared file information entries.

getPieceLength()

public final long getPieceLength()

Gets the number of bytes in each piece. For more information please see .

Returns: long - The number of bytes in each piece.

getPieces()

public final byte[] getPieces()

Gets a byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.

Returns: byte[] - A byte array consisting of the concatenation of all 20-byte SHA1 hash values, one per piece.