public void ReadBody(Stream s) { if (!this.Size.IsUnknown) { var data = new byte[this.Size.Value]; if (s.Read(data, 0, (int)this.Size.Value)<this.Size.Value) { throw new EndOfStreamException(); } this.Data = data; } }