NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BufferedStream Constructor (Stream, Int32)

Initializes a buffered stream to the chosen buffer size.

[Visual Basic]
Overloads Public Sub New( _
   ByVal stream As Stream, _
   ByVal bufferSize As Integer _
)
[C#]
public BufferedStream(
   Stream stream,
   int bufferSize
);
[C++]
public: BufferedStream(
   Stream* stream,
   int bufferSize
);
[JScript]
public function BufferedStream(
   stream : Stream,
   bufferSize : int
);

Parameters

stream
The current stream.
bufferSize
The buffer size in bytes.

Exceptions

Exception Type Condition
ArgumentNullException stream is null.
ArgumentOutOfRangeException bufferSize is negative.

Remarks

A shared read/write buffer is allocated the first time a BufferedStream object is initialized with this constructor. The shared buffer is not used if all reads and writes are greater than or equal to bufferSize.

See Also

BufferedStream Class | BufferedStream Members | System.IO Namespace | BufferedStream Constructor Overload List