SkipRawBytes() public method

Reads and discards size bytes.
the end of the stream /// or the current limit was reached
public SkipRawBytes ( int size ) : void
size int
return void
Exemplo n.º 1
0
        public void SkipRawBytesBug()
        {
            byte[]           rawBytes = new byte[] { 1, 2 };
            CodedInputStream input    = CodedInputStream.CreateInstance(rawBytes);

            int limit = input.PushLimit(1);

            input.SkipRawBytes(1);
            input.PopLimit(limit);
            Assert.AreEqual(2, input.ReadRawByte());
        }