*/
    public ManagementImpl.RecordInfo[] getRecords() {
        ManagementImpl.RecordInfo[] result = null;

        if (isIndexPage() || isDataPage()) {
            Key key = new Key(_persistit);
            Value value = new Value(_persistit);

            int count = (_keyBlockEnd - KEY_BLOCK_START) / KEYBLOCK_LENGTH;
            result = new ManagementImpl.RecordInfo[count];
            int n = 0;
            for (int p = KEY_BLOCK_START; p < _keyBlockEnd; p += KEYBLOCK_LENGTH) {
                int kbData = getInt(p);
                int db = decodeKeyBlockDb(kbData);
                int ebc = decodeKeyBlockEbc(kbData);
                int tail = decodeKeyBlockTail(kbData);
                int tbData = tail != 0 ? getInt(tail) : 0;
                int size = decodeTailBlockSize(tbData);
                int klength = decodeTailBlockKLength(tbData);
                boolean inUse = decodeTailBlockInUse(tbData);

                ManagementImpl.RecordInfo rec = new ManagementImpl.RecordInfo();
                rec._kbOffset = p;
                rec._tbOffset = tail;
                rec._ebc = ebc;
                rec._db = db;
                rec._klength = klength;
                rec._size = size;
                rec._inUse = inUse;

                byte[] kbytes = key.getEncodedBytes();
                kbytes[ebc] = (byte) db;
                System.arraycopy(_bytes, tail + _tailHeaderSize, kbytes, ebc + 1, klength);
                key.setEncodedSize(ebc + 1 + klength);
                rec._key = new KeyState(key);

                if (isIndexPage()) {
                    rec._pointerValue = getInt(tail + 4);
                } else {
                    int vsize = size - _tailHeaderSize - klength;
                    if (vsize < 0)
                        vsize = 0;
                    value.putEncodedBytes(_bytes, tail + _tailHeaderSize + klength, vsize);
                    if (value.isDefined() && (value.getEncodedBytes()[0] & 0xFF) == LONGREC_TYPE) {
                        value.setLongRecordMode(true);
                    } else {
                        value.setLongRecordMode(false);
                    }
                    rec._value = new ValueState(value);
                }
                result[n++] = rec;
            }
        } else if (isGarbagePage()) {
            int count = (_bufferSize - _alloc) / GARBAGE_BLOCK_SIZE;
            result = new ManagementImpl.RecordInfo[count];
            int n = 0;
            for (int p = _alloc; p < _bufferSize; p += GARBAGE_BLOCK_SIZE) {
                ManagementImpl.RecordInfo rec = new ManagementImpl.RecordInfo();
                rec._tbOffset = p;
                rec._garbageStatus = getInt(p + GARBAGE_BLOCK_STATUS);
                rec._garbageLeftPage = getLong(p + GARBAGE_BLOCK_LEFT_PAGE);
                rec._garbageRightPage = getLong(p + GARBAGE_BLOCK_RIGHT_PAGE);
                result[n++] = rec;
            }
        }
        return result;
    }