CopyStream Method
Definition
- Assemblies
- Cuemon.Kernel.dll
CopyStream(IDecorator<Stream>, Stream, int, bool)
Copies the contents of the enclosed Stream to the specified destination.
public static void CopyStream(this IDecorator<Stream> decorator, Stream destination, int bufferSize = 81920, bool changePosition = true)
Parameters
decoratorIDecorator<Stream>The IDecorator<T> that wraps the source stream.
destinationStreamThe destination stream to which the contents of the source stream are copied.
bufferSizeintThe size of the buffer, in bytes. The value must be greater than zero. The default is 81920.
changePositionbooltrue to temporarily reset the position of the enclosed stream to the beginning before copying; otherwise, false to preserve the current position.
Exceptions
- ArgumentNullException
decoratoris null.