hds.BufferHandler.readByte C# (CSharp) Method

readByte() public static method

public static readByte ( byte &data, int &offset ) : byte
data byte
offset int
return byte
        public static byte readByte(ref byte[] data,ref int offset)
        {
            // This causes sometimes an error ...
            byte t = data[offset];
            offset++;
            return t;
        }

Usage Example

Beispiel #1
0
        private int parseAttributesPack(ref Attribute[] attList, int maxGroups, ref byte[] data, int offset)
        {
            for (int i = 0; i < maxGroups; i++)
            {
                byte groupIndicator = BufferHandler.readByte(ref data, ref offset);
                int  basePos        = i * 7;
                //Output.WriteLine("Parsing group:"+i);

                //Output.WriteLine("Group indicator:"+(int)groupIndicator);

                for (int j = 0; j < 7; j++)
                {
                    if ((groupIndicator & (1 << j)) == 1)                  // Attribute is being updated
                    //Output.WriteLine("Updating: "+attList[basePos+j].getName());
                    {
                    }
                    else
                    {
                        //Output.WriteLine("Not Updating: "+attList[basePos+j].getName());
                    }
                }

                if (groupIndicator < 0x80)                // More groups flag is OFF
                {
                    break;
                }
                if (groupIndicator == 0x00)
                {
                    break;
                }
            }

            return(offset);
        }
All Usage Examples Of hds.BufferHandler::readByte