natix.CompactDS.OctetStream.Write C# (CSharp) Method

Write() public method

Writes a byte to the position indicated in ctx.Offset, then increments ctx.Offset
public Write ( byte b, Context ctx ) : void
b byte
ctx Context
return void
        public void Write(byte b, Context ctx)
        {
            if (ctx.Offset == this.buff.Count) {
                this.buff.Add (b);
            } else if (ctx.Offset > this.buff.Count) {
                throw new ArgumentOutOfRangeException ("Trying to write out of declared bounds");
            } else {
                this.buff [ctx.Offset] = b;
            }
            ++ctx.Offset;
        }

Same methods

OctetStream::Write ( byte b, int times, Context ctx ) : void