Reads all the bytes from the current stream and writes them to a destination stream, using a specified buffer size.
- s (Stream)
[Missing <param name="s"/> documentation for "M:InTheHand.IO.StreamHelper.CopyTo(System.IO.Stream,System.IO.Stream,System.Int32)"]
- destination (Stream)
- The stream that will contain the contents of the current stream.
- bufferSize (Int32)
- The size of the buffer. This value must be greater than zero. The default size is 4096.
Copying begins at the current position in the current stream.
| Exception | Condition |
|---|---|
| ArgumentNullException | destination is a null reference (Nothing in Visual Basic). |
| ArgumentOutOfRangeException | bufferSize is negative or zero. |
| NotSupportedException | The current stream does not support reading.
-or- destination does not support writing. |