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 );
Exception Type | Condition |
---|---|
ArgumentNullException | stream is null. |
ArgumentOutOfRangeException | bufferSize is negative. |
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.
BufferedStream Class | BufferedStream Members | System.IO Namespace | BufferedStream Constructor Overload List