public void WriteSequenceInfo(PlainBufferSequenceInfo sequenceInfo)
 {
     WriteTag(PlainBufferConsts.TAG_SEQ_INFO);
     output.WriteRawLittleEndian32(PlainBufferBuilder.ComputeSkipLengthForSequenceInfo());
     WriteTag(PlainBufferConsts.TAG_SEQ_INFO_EPOCH);
     output.WriteRawLittleEndian32((int)sequenceInfo.GetEpoch());
     WriteTag(PlainBufferConsts.TAG_SEQ_INFO_TS);
     output.WriteRawLittleEndian64(sequenceInfo.GetTimestamp());
     WriteTag(PlainBufferConsts.TAG_SEQ_INFO_ROW_INDEX);
     output.WriteRawLittleEndian32((int)sequenceInfo.GetRowIndex());
 }
        public PlainBufferSequenceInfo ReadSequenceInfo()
        {
            if (!CheckLastTagWas(PlainBufferConsts.TAG_SEQ_INFO))
            {
                throw new IOException("Expect TAG_SEQ_INFO but it was " + PlainBufferConsts.PrintTag(GetLastTag()));
            }

            this.inputStream.ReadRawLittleEndian32();// length
            ReadTag();
            PlainBufferSequenceInfo seq = new PlainBufferSequenceInfo();

            if (CheckLastTagWas(PlainBufferConsts.TAG_SEQ_INFO_EPOCH))
            {
                seq.SetEpoch(ReadUInt32());
                ReadTag();
            }
            else
            {
                throw new IOException("Expect TAG_SEQ_INFO_EPOCH but it was " + PlainBufferConsts.PrintTag(GetLastTag()));
            }

            if (CheckLastTagWas(PlainBufferConsts.TAG_SEQ_INFO_TS))
            {
                seq.SetTimestamp((long)ReadInt64());
                ReadTag();
            }
            else
            {
                throw new IOException("Expect TAG_SEQ_INFO_TS but it was " + PlainBufferConsts.PrintTag(GetLastTag()));
            }

            if (CheckLastTagWas(PlainBufferConsts.TAG_SEQ_INFO_ROW_INDEX))
            {
                seq.SetRowIndex(ReadUInt32());
                ReadTag();
            }
            else
            {
                throw new IOException("Expect TAG_SEQ_INFO_ROW_INDEX but it was " + PlainBufferConsts.PrintTag(GetLastTag()));
            }

            return(seq);
        }
 public PlainBufferExtension()
 {
     this.sequenceInfo = new PlainBufferSequenceInfo();
 }
 public void setSequenceInfo(PlainBufferSequenceInfo sequenceInfo)
 {
     this.sequenceInfo = sequenceInfo;
 }