public byte[] read(int index) throws IOException {
	if (index<0 || index>= size) throw new IndexOutOfBoundsException();
	file.seek(index*blockSize);
	byte[] block = new byte[blockSize];
	int retVal = file.read(block);
	if (retVal != blockSize) throw new InvalidBlockFileException(index);
	return block;
    }