public static IOutputStream AsOutputStream (this Stream source) { if (source == null) throw new ArgumentNullException ("source"); return new StreamToOutputStreamAdapter (source); }