summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2008-03-06 20:32:46 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2008-03-06 20:32:46 +0000
commit21b3565f0b32606586d3a3bfaed29c5d8c3e32d8 (patch)
treed270aef6191b1421c306e9c6ce325a7482d47d51
parent3bbc8a0eefba7199e5402d45c86ffe5dbb3da1ad (diff)
downloadjackcess-21b3565f0b32606586d3a3bfaed29c5d8c3e32d8.tar.gz
jackcess-21b3565f0b32606586d3a3bfaed29c5d8c3e32d8.zip
fix toString for Entry
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@250 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/Index.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java
index 577f4de..df9fb04 100644
--- a/src/java/com/healthmarketscience/jackcess/Index.java
+++ b/src/java/com/healthmarketscience/jackcess/Index.java
@@ -1216,15 +1216,16 @@ public class Index implements Comparable<Index> {
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
@@ -1326,10 +1327,7 @@ public class Index implements Comparable<Index> {
@Override
public String toString() {
return ("Node RowId = " + getRowId() +
- ", SubPage = " + _subPageNumber +
- ", Bytes = " +
- ByteUtil.toHexString(ByteBuffer.wrap(getEntryBytes()),
- getEntryBytes().length) + "\n");
+ ", SubPage = " + _subPageNumber + entryBytesToString() + "\n");
}
}