*         quickly find pointer paths in pages.
     */
    String toStringDetail(final long findPointer, final int maxKeyDisplayLength, final int maxValueDisplayLength,
            final int contextLines, final boolean all) {
        final StringBuilder sb = new StringBuilder(String.format(
                "Page %,d in volume %s at index @%,d status %s type %s", _page, _vol, _poolIndex,
                getStatusDisplayString(), getPageTypeName()));
        if (!isValid()) {
            sb.append(" - invalid");
        } else if (isDataPage() || isIndexPage()) {
            sb.append(String.format("\n  type=%,d  alloc=%,d  slack=%,d  " + "keyBlockStart=%,d  keyBlockEnd=%,d "
                    + "timestamp=%,d generation=%,d right=%,d hash=%,d", _type, _alloc, _slack, KEY_BLOCK_START,
                    _keyBlockEnd, getTimestamp(), getGeneration(), getRightSibling(), _pool.hashIndex(_vol, _page)));
            try {
                final Key key = new Key(_persistit);
                final Value value = new Value(_persistit);
                final RecordInfo[] records = getRecords();
                int foundPointerRecord = -1;
                if (isIndexPage() && findPointer >= 0) {
                    for (int index = 0; index < records.length; index++) {
                        if (records[index].getPointerValue() == findPointer) {
                            foundPointerRecord = index;
                        }
                    }
                }
                boolean elision = false;
                for (int index = 0; index < records.length; index++) {
                    RecordInfo r = records[index];
                    r.getKeyState().copyTo(key);
                    String mark = " ";
                    boolean selected = all | index < contextLines || index >= records.length - contextLines;
                    if (foundPointerRecord >= 0) {
                        selected |= (index >= foundPointerRecord - contextLines)
                                && (index <= foundPointerRecord + contextLines);
                        if (index == foundPointerRecord) {
                            mark = "*";
                        }
                    }

                    if (selected) {
                        if (elision) {
                            sb.append(String.format("\n     ..."));
                            elision = false;
                        }
                        if (isDataPage()) {
                            r.getValueState().copyTo(value);
                            sb.append(String.format("\n%s   %5d: db=%3d ebc=%3d tb=%,5d [%,d]%s=[%,d]%s", mark, r
                                    .getKbOffset(), r.getDb(), r.getEbc(), r.getTbOffset(), r.getKLength(), Util
                                    .abridge(key.toString(), maxKeyDisplayLength),
                                    r.getValueState().getEncodedBytes().length, Util.abridge(value.toString(),
                                            maxValueDisplayLength)));
                        } else {
                            sb.append(String.format("\n%s  %5d: db=%3d ebc=%3d tb=%,5d [%,d]%s->%,d", mark, r
                                    .getKbOffset(), r.getDb(), r.getEbc(), r.getTbOffset(), r.getKLength(), Util
                                    .abridge(key.toString(), maxKeyDisplayLength), r.getPointerValue()));
                        }
                    } else {
                        elision = true;
                    }

                }
            } catch (Exception e) {
                sb.append(" - " + e);
            }
        } else if (isHeadPage()) {
            sb.append(String.format("\n  type=%,d  " + "timestamp=%,d generation=%,d right=%,d hash=%,d", _type,
                    getTimestamp(), getGeneration(), getRightSibling(), _pool.hashIndex(_vol, _page)));
            sb.append(String.format("\n  nextAvailablePage=%,d extendedPageCount=%,d "
                    + " directoryRootPage=%,d garbageRootPage=%,d id=%,d ", getNextAvailablePage(_bytes),
                    getExtendedPageCount(_bytes), getDirectoryRoot(_bytes), getGarbageRoot(_bytes), getId(_bytes)));
        } else if (isGarbagePage()) {
            sb.append(String.format("\n  type=%,d  " + "timestamp=%,d generation=%,d right=%,d hash=%,d", _type,
                    getTimestamp(), getGeneration(), getRightSibling(), _pool.hashIndex(_vol, _page)));
            for (int p = _alloc; p < _bufferSize; p += GARBAGE_BLOCK_SIZE) {
                sb.append(String.format("\n  garbage chain @%,6d : %,d -> %,d", p,
                        getLong(p + GARBAGE_BLOCK_LEFT_PAGE), getLong(p + GARBAGE_BLOCK_RIGHT_PAGE)));
            }
        } else {
            sb.append(String.format("\n  type=%,d  " + "timestamp=%,d generation=%,d right=%,d hash=%,d\n", _type,
                    getTimestamp(), getGeneration(), getRightSibling(), _pool.hashIndex(_vol, _page)));
        }
        return sb.toString();
    }