Class StreamUtil
Summary description for StreamUtil.
Inheritance
System.Object
StreamUtil
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: ImageVault.Core.Lib.IO
Assembly: ImageVault.Core.dll
Syntax
public static class StreamUtil
Methods
CompareStreams(Stream, Stream)
Compares two streams and returns false if they differ, true if they are equal.
Declaration
public static bool CompareStreams(Stream a, Stream b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | a | |
| System.IO.Stream | b |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IsStreamEfficientForRandomAccess(Stream)
Checks if the supplied stream is efficient for random access
Declaration
public static bool IsStreamEfficientForRandomAccess(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream |
Returns
| Type | Description |
|---|---|
| System.Boolean |
MakeStreamEfficientForRandomAccess(Stream)
Makes sure that the stream is efficient for random access
Declaration
public static Stream MakeStreamEfficientForRandomAccess(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | The input stream to check |
Returns
| Type | Description |
|---|---|
| System.IO.Stream | The resulting stream to use |
Remarks
If the stream is deemed inefficient, a new System.IO.MemoryStream is created, content is copied from the source stream and the source is disposed.