public interface BlockSet
Modifier and Type | Method and Description |
---|---|
int |
blockCount()
Get the total number of blocks in this block set.
|
long |
blockSize()
Get the size of a block in this set.
|
void |
clear()
Reset block presence information (may not perform actual deletion of data)
|
boolean |
isComplete()
Shortcut method to determine if all blocks are present
|
boolean |
isEmpty()
Shortcut method to determine if no blocks are present
|
boolean |
isPresent(int blockIndex)
Check if block is present.
|
long |
lastBlockSize()
Get the size of the last block in this set
|
long |
length()
Get the total length of this block set
|
int blockCount()
long length()
long blockSize()
Note that the last block might be smaller due to truncation (i.e. when the chunk's size is not a factor of the size of a block).
lastBlockSize()
long lastBlockSize()
blockSize()
boolean isPresent(int blockIndex)
blockIndex
- Index of a block in this set
(0-based, maximum value is blockCount()
- 1
)boolean isComplete()
boolean isEmpty()
void clear()
Copyright © 2016–2021. All rights reserved.