Class StreamUtilityExtensions
This is an extension implementation of the most common methods on the StreamUtility class.
Inheritance
Namespace: Cuemon.IO
Assembly: Cuemon.Core.dll
Syntax
public static class StreamUtilityExtensions
Methods
| Improve this DocCopy(Stream)
Creates and returns a seekable copy of the source System.IO.Stream.
Declaration
public static Stream Copy(this Stream source)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | source | The source System.IO.Stream to create a copy from. |
Returns
Type | Description |
---|---|
System.IO.Stream | A seekable System.IO.Stream that will contain the contents of the source stream. |
Copy(Stream, Boolean)
Creates and returns a seekable copy of the source System.IO.Stream.
Declaration
public static Stream Copy(this Stream source, bool leaveStreamOpen)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | source | The source System.IO.Stream to create a copy from. |
System.Boolean | leaveStreamOpen | if |
Returns
Type | Description |
---|---|
System.IO.Stream | A seekable System.IO.Stream that will contain the contents of the source stream. |
Copy(Stream, Boolean, Int32)
Creates and returns a seekable copy of the source System.IO.Stream.
Declaration
public static Stream Copy(this Stream source, bool leaveStreamOpen, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | source | The source System.IO.Stream to create a copy from. |
System.Boolean | leaveStreamOpen | if |
System.Int32 | bufferSize | The size of the buffer. This value must be greater than zero. The default size is 2048. |
Returns
Type | Description |
---|---|
System.IO.Stream | A seekable System.IO.Stream that will contain the contents of the |