public class DefaultChunkVerifier extends Object implements ChunkVerifier
Constructor and Description |
---|
DefaultChunkVerifier(Digester digester,
int numOfHashingThreads) |
Modifier and Type | Method and Description |
---|---|
boolean |
verify(ChunkDescriptor chunk)
Conducts verification of the provided chunk.
|
boolean |
verify(List<ChunkDescriptor> chunks,
LocalBitfield bitfield)
Conducts verification of the provided list of chunks and updates bitfield with the results.
|
boolean |
verifyIfPresent(ChunkDescriptor chunk) |
public DefaultChunkVerifier(Digester digester, int numOfHashingThreads)
public boolean verify(List<ChunkDescriptor> chunks, LocalBitfield bitfield)
ChunkVerifier
verify
in interface ChunkVerifier
chunks
- List of chunksbitfield
- the local bitfield for the torrentpublic boolean verify(ChunkDescriptor chunk)
ChunkVerifier
verify
in interface ChunkVerifier
chunk
- Chunkpublic boolean verifyIfPresent(ChunkDescriptor chunk)
verifyIfPresent
in interface ChunkVerifier
Copyright © 2016–2021. All rights reserved.