keyBytes[0] = (byte) (i >> 8);
keyBytes[1] = (byte) i;
}
setKeyData(keyBytes, keyPrefix, keyEntry, dataEntry);
final OperationStatus status;
if (duplicates) {
status = db.putNoDupData(null, keyEntry, dataEntry);
} else {
status = db.putNoOverwrite(null, keyEntry, dataEntry);
}
if (status != OperationStatus.SUCCESS) {
throw new IllegalStateException(status.toString());
}
}
/* Position a cursor to the first record. */
final Cursor cursor = db.openCursor(null, null);
OperationStatus status = cursor.getFirst(keyEntry, dataEntry, null);
assert status == OperationStatus.SUCCESS;
/*
* Calculate BIN size including LNs/data. The recalcKeyPrefix and
* compactMemory methods are called to simulate normal operation.