C# Class Stumps.StreamUtility

A class that represents a set of Stream based functions.
Exibir arquivo Open project: Cayan-LLC/stumps Class Usage Examples

Public Methods

Method Description
ConvertStreamToByteArray ( Stream stream ) : byte[]

Converts a stream to a byte array.

CopyStream ( Stream inputStream, Stream outputStream ) : void

Copies data from an input stream to an output stream.

CopyStream ( Stream inputStream, Stream outputStream, int startingPosition ) : void

Copies data from an input stream to an output stream.

WriteUtf8StringToStream ( string value, Stream stream ) : void

Writes the UTF8 string to a stream.

Private Methods

Method Description
WriteStringToStream ( string value, Stream stream, Encoding encoding ) : void

Writes the string to a stream.

Method Details

ConvertStreamToByteArray() public static method

Converts a stream to a byte array.
is null.
public static ConvertStreamToByteArray ( Stream stream ) : byte[]
stream Stream The stream to convert to a byte array.
return byte[]

CopyStream() public static method

Copies data from an input stream to an output stream.
public static CopyStream ( Stream inputStream, Stream outputStream ) : void
inputStream Stream The input stream.
outputStream Stream The output stream.
return void

CopyStream() public static method

Copies data from an input stream to an output stream.
/// is null. /// or /// is null. ///
public static CopyStream ( Stream inputStream, Stream outputStream, int startingPosition ) : void
inputStream Stream The input stream.
outputStream Stream The output stream.
startingPosition int The starting position of the input stream.
return void

WriteUtf8StringToStream() public static method

Writes the UTF8 string to a stream.
/// is null. /// or /// is null. ///
public static WriteUtf8StringToStream ( string value, Stream stream ) : void
value string The value to write to the stream.
stream Stream The stream to write to.
return void