public final class TorrentFormat extends FormatBase
Represents a torrent file.
Please find more information at <a href="https://en.wikipedia.org/wiki/Torrent_file">https://en.wikipedia.org/wiki/Torrent_file</a>
.
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 writable metadata properties associated with the file.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and optionally managed resources.
|
TorrentMetadata |
getTorrentInfo()
Gets the torrent file metadata.
|
int |
getType()
Gets the type of the loaded file.
|
close, dispose, getMetadata, getMIMEType, readByMetadataKey, save, save, save
public TorrentFormat(String fileName)
Initializes a new instance of the TorrentFormat
class.
fileName
- A string that contains the full name of the file from which to create a TorrentFormat
instance.public TorrentFormat(InputStream input)
Initializes a new instance of the TorrentFormat
class.
input
- A stream that contains the data for this TorrentFormat
.public int getType()
Gets the type of the loaded file.
getType
in class FormatBase
public final TorrentMetadata getTorrentInfo()
Gets the torrent file metadata.
public void cleanMetadata()
Removes writable metadata properties associated with the file.
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.