public class PieceUtils extends Object
Constructor and Description |
---|
PieceUtils() |
Modifier and Type | Method and Description |
---|---|
static DataRange |
buildReadWriteDataRange(List<StorageUnit> nonEmptyStorageUnits)
Builds a read write data range with the ordered passed in storage units
|
static int |
calculateNumberOfChunks(long totalSize,
long chunkSize)
Calculate the number of chunks there are in a torrent based on the totalSize and chunkSize
|
public static int calculateNumberOfChunks(long totalSize, long chunkSize)
totalSize
- the totalSize of the torrentchunkSize
- the chunk size of the torrentpublic static DataRange buildReadWriteDataRange(List<StorageUnit> nonEmptyStorageUnits)
nonEmptyStorageUnits
- the non empty storage units to create this datarange withCopyright © 2016–2021. All rights reserved.