private void Parse(Templates templates) { this._flowset = new List <FlowSet>(); Int32 length = _bytes.Length - 20; Byte[] header = new Byte[20]; Byte[] flowset = new Byte[length]; Array.Copy(_bytes, 0, header, 0, 20); Array.Copy(_bytes, 20, flowset, 0, length); this._header = new Header(header); byte[] reverse = flowset.Reverse().ToArray(); int templengh = 0; while ((templengh + 2) < flowset.Length) { UInt16 lengths = BitConverter.ToUInt16(reverse, flowset.Length - sizeof(Int16) - (templengh + 2)); Byte[] bflowsets = new Byte[lengths]; Array.Copy(flowset, templengh, bflowsets, 0, lengths); FlowSet flowsets = new FlowSet(bflowsets, templates); this._flowset.Add(flowsets); templengh += lengths; } }
private void Parse(Templates templates) { this._flowset = new List<FlowSet>(); Int32 length = _bytes.Length - 20; Byte[] header = new Byte[20]; Byte[] flowset = new Byte[length]; Array.Copy(_bytes, 0, header, 0, 20); Array.Copy(_bytes, 20, flowset, 0, length); this._header = new Header(header); byte[] reverse = flowset.Reverse().ToArray(); int templengh = 0; while ((templengh + 2) < flowset.Length) { UInt16 lengths = BitConverter.ToUInt16(reverse, flowset.Length - sizeof(Int16) - (templengh+2)); Byte[] bflowsets = new Byte[lengths]; Array.Copy(flowset, templengh, bflowsets, 0, lengths); FlowSet flowsets = new FlowSet(bflowsets, templates); this._flowset.Add(flowsets); templengh += lengths; } }