Exemplo n.º 1
0
        internal void getByteArray(Page pg, int i)
        {
            int len  = BtreePage.getKeyStrSize(pg, i);
            int offs = BtreePage.firstKeyOffs + BtreePage.getKeyStrOffs(pg, i);

            byte[] bval = new byte[len];
            Array.Copy(pg.data, offs, bval, 0, len);
            key = new Key(bval);
        }
Exemplo n.º 2
0
        internal void  getStr(Page pg, int i)
        {
            int len  = BtreePage.getKeyStrSize(pg, i);
            int offs = BtreePage.firstKeyOffs + BtreePage.getKeyStrOffs(pg, i);

            char[] sval = new char[len];
            for (int j = 0; j < len; j++)
            {
                sval[j] = (char)Bytes.unpack2(pg.data, offs);
                offs   += 2;
            }
            key = new Key(sval);
        }