public class Block extends Object
| Constructor and Description |
|---|
Block(int index,
int size)
Creates a new block which is part of a
Piece. |
| Modifier and Type | Method and Description |
|---|---|
int |
getIndex()
Gets the index of this block within the owning
Piece |
int |
getSize()
Gets the amount of bytes expected for this block.
|
BlockStatus |
getStatus()
Gets the current status of this block.
|
void |
setStatus(BlockStatus status)
Updates the status of the block.
|
String |
toString() |
public Block(int index,
int size)
Piece.index - The index within the owning piece.size - The size in bytes of this block.public void setStatus(BlockStatus status)
status - The new status of this block.public BlockStatus getStatus()
public int getSize()
public int getIndex()
PieceCopyright © 2016. All rights reserved.