public final class TorrentFormat extends FormatBase
Represents the torrent format. Please see more at 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.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
|
TorrentMetadata |
getTorrentInfo()
Gets the torrent file metadata.
|
int |
getType()
Gets the 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 the document type.
getType
in class FormatBase
public final TorrentMetadata getTorrentInfo()
Gets the torrent file metadata.
public void cleanMetadata()
Removes torrent metadata.
cleanMetadata
in class FormatBase
protected void dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
dispose
in class FormatBase
disposing
- true
to release both managed and unmanaged resources;
false
to release only unmanaged resources.Copyright © 2019. All rights reserved.