Class StreamConsumer
Class for copying and reading streams.
Inheritance
System.Object
StreamConsumer
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.BaseLibrary.IO
Assembly: EPiServer.BaseLibrary.dll
Version: 8.11.0Syntax
public static class StreamConsumer
Methods
ConsumeToEnd(Stream, StreamConsumer.StreamConsumerDelegate)
Reads a stream to its end, calling a callback method with blocks of data.
Declaration
public static void ConsumeToEnd(Stream input, StreamConsumer.StreamConsumerDelegate streamConsumerDelegate)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The stream to read. |
StreamConsumer.StreamConsumerDelegate | streamConsumerDelegate | A delegate to the callback method. |
CopyToEnd(Stream, Stream)
Reads a stream to its end and writes the contents to another stream.
Declaration
public static void CopyToEnd(Stream input, Stream output)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The stream to read from. |
System.IO.Stream | output | The stream to write to. |