public final class TorrentFormat extends FormatBase
Represents torrent format. See more: https://en.wikipedia.org/wiki/Torrent_file.
FormatBase
Constructor and Description |
---|
TorrentFormat(InputStream input)
Initializes a new instance of the
TorrentFormat class. |
TorrentFormat(String fileName)
Initializes a new instance of the
TorrentFormat class. |
Modifier and Type | Method and Description |
---|---|
void |
cleanMetadata()
Removes torrent metadata.
|
TorrentMetadata |
getTorrentInfo()
Gets common torrent information like author's comment, creation date etc.
|
int |
getType()
Gets document type.
|
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public TorrentFormat(String fileName)
Initializes a new instance of the TorrentFormat
class.
fileName
- Absolute path to the file.public TorrentFormat(InputStream input)
Initializes a new instance of the TorrentFormat
class.
input
- File stream.public int getType()
Gets document type.
getType
in class FormatBase
public final TorrentMetadata getTorrentInfo()
Gets common torrent information like author's comment, creation date etc.
public void cleanMetadata()
Removes torrent metadata.
cleanMetadata
in class FormatBase