public final class ReadPieceAlert extends TorrentAlert<read_piece_alert>
TorrentHandle.readPiece(int)
is completed. If the read failed, the torrent
is paused and an error state is set and the buffer member of the alert
is 0. If successful, bufferPtr() points to a buffer containing all the data
of the piece. piece() is the piece index that was read. size()
is the number of bytes that was read.
If the operation fails, error() will indicate what went wrong.
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 |
|---|---|
long |
bufferPtr() |
ErrorCode |
error() |
int |
piece() |
int |
size() |
handle, torrentNamepublic ErrorCode error()
public long bufferPtr()
public int piece()
public int size()