lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush" <geo...@aroush.net>
Subject RE: IndexOutput.cs
Date Mon, 08 May 2006 14:10:09 GMT
Thanks for your feed back.  I will remove the comment from 1.9's build 3
release.

Btw, there are few more areas in the code of 1.9 build 2 release where I
have similar questions which I need everyone's feedback on.  Just search for
the text "Aroush" in the code base and you will find them.  If you can offer
your suggestion on those questions that I have, I can clean them up in the
upcoming build 3 release of 1.9.

Regards,

-- George Aroush 

-----Original Message-----
From: J C [mailto:roamingcode@hotmail.com] 
Sent: Thursday, May 04, 2006 12:07 AM
To: lucene-net-dev@incubator.apache.org
Subject: IndexOutput.cs

Hi there,
I found the following lines today

i = (int) (((uint) i) >> 7);    // {{Aroush-1.9}} Is this OK?!  long to 
uint, to int conversion.

Method:public virtual void  WriteVLong(long i)
File: IndexOutput.cs

It seems to be OK regarding my experience in developing network com program:
The following is from a network transport program i developed:

protected void WriteByte(byte value)
{ ...}

public void Write(long value) {
            byte[] octets = new byte[8];
            byte len;
            long endValue = (value < 0) ? -1 : 0;
            long endSign = endValue & 0x80;

            for (len = 0; len == 0 || value != endValue || (octets[len - 1]
& 0x80) != endSign; len++) {
                octets[len] = (byte)(value & 0xFF);
                value >>= 8;
            }

            WriteByte((byte)len); // Length
            for (int i = len - 1; i >= 0; i--) {
                WriteByte((byte)octets[i]);
            }
        }

_________________________________________________________________
Send 1c txt to other Telstra Pre-Paid Plus mobiles. Join now
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fadsfac%2Enet%2Flink%2Easp%3F
cc%3DTEL185%2E19163%2E0%26clk%3D1%26creativeID%3D29997&_t=754399967&_m=EXT


Mime
View raw message