void keyAt(final int foundAt, final Key key) {
        Debug.$assert0.t(foundAt > 0 && foundAt < _keyBlockEnd);
        if (isDataPage() || isIndexPage()) {
            for (int p = KEY_BLOCK_START; p <= foundAt; p += KEYBLOCK_LENGTH) {
                int kbData = getInt(p);
                int tail = decodeKeyBlockTail(kbData);
                int ebc = decodeKeyBlockEbc(kbData);
                int db = decodeKeyBlockDb(kbData);
                int tbData = getInt(tail);
                int klength = decodeTailBlockKLength(tbData);
                byte[] keyBytes = key.getEncodedBytes();
                keyBytes[ebc] = (byte) db;
                System.arraycopy(_bytes, tail + _tailHeaderSize, keyBytes, ebc + 1, klength);
                key.setEncodedSize(ebc + klength + 1);
            }
        }
    }