Lucene.Net.Store.DataOutput.WriteLong C# (CSharp) Method

WriteLong() public method

Writes a long as eight bytes.

64-bit unsigned integer written as eight bytes, high-order bytes first.

public WriteLong ( long i ) : void
i long
return void
        public virtual void WriteLong(long i)
        {
            WriteInt((int)(i >> 32));
            WriteInt((int)i);
        }

Usage Example

Example #1
0
 // pre-order traversal
 private void WriteRecursively(DataOutput @out, TernaryTreeNode node)
 {
     // write out the current node
     @out.WriteString(new string(new char[] { node.splitchar }, 0, 1));
     // prepare a mask of kids
     sbyte mask = 0;
     if (node.eqKid != null)
     {
         mask |= EQ_KID;
     }
     if (node.loKid != null)
     {
         mask |= LO_KID;
     }
     if (node.hiKid != null)
     {
         mask |= HI_KID;
     }
     if (node.token != null)
     {
         mask |= HAS_TOKEN;
     }
     if (node.val != null)
     {
         mask |= HAS_VALUE;
     }
     @out.WriteByte((byte)mask);
     if (node.token != null)
     {
         @out.WriteString(node.token);
     }
     if (node.val != null)
     {
         @out.WriteLong((long)node.val);
     }
     // recurse and write kids
     if (node.loKid != null)
     {
         WriteRecursively(@out, node.loKid);
     }
     if (node.eqKid != null)
     {
         WriteRecursively(@out, node.eqKid);
     }
     if (node.hiKid != null)
     {
         WriteRecursively(@out, node.hiKid);
     }
 }
All Usage Examples Of Lucene.Net.Store.DataOutput::WriteLong