C# Class Stumps.StreamUtility

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

Méthodes publiques

Méthode 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

Méthode Description
WriteStringToStream ( string value, Stream stream, Encoding encoding ) : void

Writes the string to a stream.

Method Details

ConvertStreamToByteArray() public static méthode

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.
Résultat byte[]

CopyStream() public static méthode

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.
Résultat void

CopyStream() public static méthode

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.
Résultat void

WriteUtf8StringToStream() public static méthode

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.
Résultat void