public StreamWrapper(Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } this.Stream = stream; }