for (int slot = 0; slot < slotCount; slot++) {
int recordLength = page.getRecordPortionLength(slot);
CounterOutputStream counter = new CounterOutputStream();
counter.setOutputStream(new NullOutputStream());
int recordId =
page.fetchFromSlot(
null,
slot,
new DataValueDescriptor[0],
(FetchDescriptor) null, true).getId();
page.logRecord(slot, page.LOG_RECORD_DEFAULT, recordId,
(FormatableBitSet) null, counter, (RecordHandle)null);
int actualLength = counter.getCount();
if (actualLength != recordLength) {
out.println(
"CORRUPT PAGE: record length mismatch at slot " + slot);
out.println(" slot entry length " + recordLength);