C# Класс Stumps.StreamUtility

A class that represents a set of Stream based functions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
WriteStringToStream ( string value, Stream stream, Encoding encoding ) : void

Writes the string to a stream.

Описание методов

ConvertStreamToByteArray() публичный статический Метод

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.
Результат byte[]

CopyStream() публичный статический Метод

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.
Результат void

CopyStream() публичный статический Метод

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.
Результат void

WriteUtf8StringToStream() публичный статический Метод

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.
Результат void