17 throw new IllegalArgumentException(
"Incorrect buffer length.");
20 int size = ((buffer[0] & 0xFF) << 16) | ((buffer[1] & 0xFF) << 8) | (buffer[2] & 0xFF);
21 int block = ((buffer[3] & 0xFF) << 16) | ((buffer[4] & 0xFF) << 8) | (buffer[5] & 0xFF);
Holds file system related constants.
static final int INDEX_SIZE
The size of an index.
static Index decode(byte[] buffer)
Decodes a buffer into an index.
Index(int size, int block)
Creates the index.
final int size
The size of the file.
int getSize()
Gets the size of the file.
int getBlock()
Gets the first block of the file.
final int block
The first block of the file.