protected override void LoadFromBuffer(byte[] buffer, int offset) { Buffer = buffer; Offset = offset; sdesDataList.Clear(); int position = HEADER_SIZE; while (PacketLength > position) { var sdes = new SdesData(); sdes.ReadFromBuffer(buffer, Offset + position); sdesDataList.Add(sdes); position += sdes.Size; } }
public void AddSdesData(SdesData sdesData) { sdesDataList.Add(sdesData); sdesData.WriteToBuffer(Buffer, endPosition); endPosition += sdesData.Size; }