ByteOrder.BIG_ENDIAN);
buffer.put((byte)getRowId().getRowNumber());
}
+
+ protected final String entryBytesToString() {
+ return (isValid() ? ", Bytes = " + ByteUtil.toHexString(
+ ByteBuffer.wrap(_entryBytes), _entryBytes.length) :
+ "");
+ }
@Override
public String toString() {
- String entryStr = (isValid() ?
- ", Bytes = " +
- ByteUtil.toHexString(ByteBuffer.wrap(_entryBytes),
- _entryBytes.length) :
- "");
- return "RowId = " + _rowId + entryStr + "\n";
+ return "RowId = " + _rowId + entryBytesToString() + "\n";
}
@Override
@Override
public String toString() {
return ("Node RowId = " + getRowId() +
- ", SubPage = " + _subPageNumber +
- ", Bytes = " +
- ByteUtil.toHexString(ByteBuffer.wrap(getEntryBytes()),
- getEntryBytes().length) + "\n");
+ ", SubPage = " + _subPageNumber + entryBytesToString() + "\n");
}
}