* Ensure that the given index is valid.
*/
private void grow(int index) {
if ((index * SizeOf.SIZE_OF_LONG) + (SizeOf.SIZE_OF_LONG - 1) >= data.length()) {
int newSize = Math.max((index * SizeOf.SIZE_OF_LONG) + DEFAULT_SIZE, 2 * data.length());
Slice newSlice = Slices.allocate(newSize);
newSlice.setBytes(0, data);
data = newSlice;
}
}