コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BinaryDataWriter"/> class based on the specified stream and
 /// character encoding, and optionally leaves the stream open.
 /// </summary>
 /// <param name="output">The output stream.</param>
 /// <param name="encoding">The character encoding to use.</param>
 /// <param name="leaveOpen"><c>true</c> to leave the stream open after the <see cref="BinaryDataWriter"/> object
 /// is disposed; otherwise <c>false</c>.</param>
 /// <exception cref="ArgumentException">The stream does not support writing or is already closed.</exception>
 /// <exception cref="ArgumentNullException">output or encoding is null.</exception>
 public BinaryDataWriter(Stream output, Encoding encoding, bool leaveOpen)
     : base(output, encoding, leaveOpen)
 {
     Encoding  = encoding;
     ByteOrder = ByteOrder.GetSystemByteOrder();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BinaryDataReader"/> class based on the specified stream and
 /// character encoding, and optionally leaves the stream open.
 /// </summary>
 /// <param name="input">The input stream.</param>
 /// <param name="encoding">The character encoding to use.</param>
 /// <param name="leaveOpen"><c>true</c> to leave the stream open after the <see cref="BinaryDataReader"/> object
 /// is disposed; otherwise <c>false</c>.</param>
 /// <exception cref="ArgumentException">The stream does not support reading, is null, or is already closed.
 /// </exception>
 /// <exception cref="ArgumentNullException">encoding is null.</exception>
 public BinaryDataReader(Stream input, Encoding encoding, bool leaveOpen)
     : base(input, encoding, leaveOpen)
 {
     Encoding  = encoding;
     ByteOrder = ByteOrder.GetSystemByteOrder();
 }