public final class MetadataReceivedAlert extends TorrentAlert<metadata_received_alert>
Typically, when receiving this alert, you would want to save the torrent file in order to load it back up again when the session is restarted.
alertALL_CATEGORIES, BLOCK_PROGRESS_NOTIFICATION, DEBUG_NOTIFICATION, DHT_LOG_NOTIFICATION, DHT_NOTIFICATION, DHT_OPERATION_NOTIFICATION, ERROR_NOTIFICATION, FILE_PROGRESS_NOTIFICATION, INCOMING_REQUEST_NOTIFICATION, IP_BLOCK_NOTIFICATION, PEER_LOG_NOTIFICATION, PEER_NOTIFICATION, PERFORMANCE_WARNING, PICKER_LOG_NOTIFICATION, PIECE_PROGRESS_NOTIFICATION, PORT_MAPPING_LOG_NOTIFICATION, PORT_MAPPING_NOTIFICATION, SESSION_LOG_NOTIFICATION, STATS_NOTIFICATION, STATUS_NOTIFICATION, STORAGE_NOTIFICATION, TORRENT_LOG_NOTIFICATION, TRACKER_NOTIFICATION, UPLOAD_NOTIFICATION| Modifier and Type | Method and Description |
|---|---|
int |
metadataSize()
Returns the size of the metadata (info section).
|
byte[] |
torrentData()
Same as calling
torrentData(boolean) with false |
byte[] |
torrentData(boolean extra)
This method construct the torrent lazily.
|
handle, torrentNamepublic int metadataSize()
Internally it uses a lock synchronization to make it thread-safe.
public byte[] torrentData(boolean extra)
Internally it uses a lock synchronization to make it thread-safe.
extra - this controls if extra data, like trackers and web seeds
are includedpublic byte[] torrentData()
torrentData(boolean) with false