public class Block
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
BLOCK_SIZE |
Constructor and Description |
---|
Block(java.nio.ByteBuffer block,
boolean debug)
Constructor method.
|
Modifier and Type | Method and Description |
---|---|
byte |
get()
Gets one byte, increments the pointer.
|
byte |
get(int index)
Gets one byte from a given index.
|
int |
getInt(int index)
Gets four bytes from a given index.
|
short |
getShort(int index)
Gets two bytes from a given index.
|
void |
hexDump()
Prints a formatted hex dump of the block's contents.
|
public final int BLOCK_SIZE
public Block(java.nio.ByteBuffer block, boolean debug)
block
- The block byte dump.debug
- Whether debug mode is active or not.public byte get()
public byte get(int index)
index
- The index.public short getShort(int index)
index
- The index.public int getInt(int index)
index
- The index.public void hexDump()