Lucene.Net.Store.DataInput.ReadLong C# (CSharp) Method

ReadLong() public method

Reads eight bytes and returns a long.
public ReadLong ( ) : long
return long
        public virtual long ReadLong()
        {
            long halfA = ((long)ReadInt()) << 32;
            long halfB = (ReadInt() & 0xFFFFFFFFL);
            long ret = halfA | halfB;
            return ret;
        }

Usage Example

示例#1
0
 // pre-order traversal
 private void ReadRecursively(DataInput @in, TernaryTreeNode node)
 {
     node.splitchar = @in.ReadString().First();
     sbyte mask = (sbyte)@in.ReadByte();
     if ((mask & HAS_TOKEN) != 0)
     {
         node.token = @in.ReadString();
     }
     if ((mask & HAS_VALUE) != 0)
     {
         node.val = Convert.ToInt64(@in.ReadLong());
     }
     if ((mask & LO_KID) != 0)
     {
         node.loKid = new TernaryTreeNode();
         ReadRecursively(@in, node.loKid);
     }
     if ((mask & EQ_KID) != 0)
     {
         node.eqKid = new TernaryTreeNode();
         ReadRecursively(@in, node.eqKid);
     }
     if ((mask & HI_KID) != 0)
     {
         node.hiKid = new TernaryTreeNode();
         ReadRecursively(@in, node.hiKid);
     }
 }
All Usage Examples Of Lucene.Net.Store.DataInput::ReadLong