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 void WriteExtension(PlainBufferExtension extension)
        {
            WriteTag(PlainBufferConsts.TAG_EXTENSION);
            output.WriteRawLittleEndian32(PlainBufferBuilder.ComputeSkipLengthForExtensionTag(extension));
            int extensionCount = 0;

            if (extension.HasSeq())
            {
                WriteSequenceInfo(extension.GetSequenceInfo());
                extensionCount++;
            }

            if (extensionCount == 0)
            {
                throw new IOException("no extension tag is Writen.");
            }
        }