Exemplo n.º 1
0
        public void build(byte[] data)
        {
            ByteBuffer buf = ByteBuffer.wrap(data);

            for (int i = 0; i < this.__flag.Length; i++)
            {
                this.__flag[i] = buf.get();
            }

            if (this.hasPos())
            {
                this.pos = buf.getInt();
            }

            if (this.hasZjhCommon())
            {
                int size = buf.getShort();
                for (int i = 0; i < size; i++)
                {
                    byte[] bytes = new byte[buf.getInt()];
                    buf.get(ref bytes, 0, bytes.Length);
                    this.zjh_common.Add(SEAT_COMMON.decode(bytes));
                }
            }

            if (this.hasRound())
            {
                this.round = buf.getInt();
            }
        }
        public void build(byte[] data)
        {
            ByteBuffer buf = ByteBuffer.wrap(data);

            for (int i = 0; i < this.__flag.Length; i++)
            {
                this.__flag[i] = buf.get();
            }

            if (this.hasZjhEnumRoomresult())
            {
                this.zjh_enum_roomresult = (ENUM_ROOMRESULT)buf.get();
            }

            if (this.hasZjhCommon())
            {
                int size = buf.getShort();
                for (int i = 0; i < size; i++)
                {
                    byte[] bytes = new byte[buf.getInt()];
                    buf.get(ref bytes, 0, bytes.Length);
                    this.zjh_common.Add(SEAT_COMMON.decode(bytes));
                }
            }
        }