示例#1
0
        private static string ReadString(PageCursor cursor)
        {
            int length = cursor.Int;

            if (length < 0 || length >= cursor.CurrentPageSize)
            {
                cursor.CursorException = "Unexpected length of string " + length;
                return(null);
            }

            sbyte[] bytes = new sbyte[length];
            cursor.GetBytes(bytes);
            return(StringHelper.NewString(bytes, UTF_8));
        }
示例#2
0
 public override void ReadKey(PageCursor cursor, MutableLong into, int keySize)
 {
     into.Value = cursor.Long;
     cursor.GetBytes(new sbyte[_keyPadding]);
 }