public void DiscardSomeReadBytes() { CompositeByteBuffer cbuf = Unpooled.CompositeBuffer(); int len = 8 * 4; for (int i = 0; i < len; i += 4) { IByteBuffer buf = Unpooled.Buffer().WriteInt(i); cbuf.AdjustCapacity(cbuf.WriterIndex); cbuf.AddComponent(buf).SetWriterIndex(i + 4); } cbuf.WriteByte(1); var me = new byte[len]; cbuf.ReadBytes(me); cbuf.ReadByte(); cbuf.DiscardSomeReadBytes(); cbuf.Release(); }