public XmlObjectReader( Stream stream) { if (null == stream) { throw new ArgumentNullException("stream"); } this._stream = new InspectorStream(stream); }
public JsonObjectWriter( Stream stream) { if (null == stream) { throw new ArgumentNullException("stream"); } this._stream = new InspectorStream(stream); this._writer = new BinaryWriter(this._stream, Encoding.UTF8); }
/// <summary> /// Initializes a new instance of the <c>PortableBinaryObjectReader</c> /// using the specified input stream. /// </summary> /// <param name="stream">The input stream.</param> public PortableBinaryObjectReader( Stream stream) { if (null == stream) { throw new ArgumentNullException("stream"); } this._stream = new InspectorStream(stream); this._reader = new BinaryReader(this._stream); }
public BencodingObjectReader( Stream stream) { if (null == stream) { throw new ArgumentNullException("stream"); } this._stream = new InspectorStream(stream); this._reader = new BinaryReader(this._stream, Encoding.UTF8); }
public XmlObjectWriter( Stream stream) { if (null == stream) { throw new ArgumentNullException("stream"); } this._stream = new InspectorStream(stream); this._writer = XmlWriter.Create(this._stream, new XmlWriterSettings() { ConformanceLevel = ConformanceLevel.Fragment, CheckCharacters = false, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize, Encoding = new UTF8Encoding(false), }); }