public interface DataDescriptor extends Closeable
Modifier and Type | Method and Description |
---|---|
BitSet |
getAllPiecesForFiles(Set<TorrentFile> files)
Get all pieces that contain any part of the set of files
|
LocalBitfield |
getBitfield() |
List<ChunkDescriptor> |
getChunkDescriptors() |
List<TorrentFile> |
getFilesForPiece(int pieceIndex)
Deprecated.
use
getAllPiecesForFiles(Set) or getPiecesWithOnlyFiles(Set) instead |
long |
getLeft()
Get the amount of data left to verify
|
BitSet |
getPiecesWithOnlyFiles(Set<TorrentFile> files)
Get the set of pieces that only contain parts of the the set of files
|
DataReader |
getReader()
Get the data reader interface, which provides convenient ways
to work with torrent's data (e.g.
|
boolean |
startedAsSeed()
Check if the torrent was finished upon initial hashing
|
void |
waitForAllPieces()
Wait for all of the pieces of the torrent to download
|
List<ChunkDescriptor> getChunkDescriptors()
LocalBitfield getBitfield()
@Deprecated List<TorrentFile> getFilesForPiece(int pieceIndex)
getAllPiecesForFiles(Set)
or getPiecesWithOnlyFiles(Set)
insteadBitSet getAllPiecesForFiles(Set<TorrentFile> files)
files
- the files the pieces are needed forBitSet getPiecesWithOnlyFiles(Set<TorrentFile> files)
files
- the files the pieces are needed forDataReader getReader()
void waitForAllPieces() throws InterruptedException
InterruptedException
boolean startedAsSeed()
long getLeft()
Copyright © 2016–2021. All rights reserved.