C# Class Simple.StreamExtensions

Afficher le fichier Open project: juanplopes/simple

Méthodes publiques

Méthode Description
ToByteArray ( this stream, int initialLength ) : byte[]

Reads data from a stream until the end is reached. The data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.

ToStream ( this str ) : StringStream
ToStream ( this str, Encoding encoding ) : StringStream

Method Details

ToByteArray() public static méthode

Reads data from a stream until the end is reached. The data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.
public static ToByteArray ( this stream, int initialLength ) : byte[]
stream this The stream to read data from
initialLength int The initial buffer length
Résultat byte[]

ToStream() public static méthode

public static ToStream ( this str ) : StringStream
str this
Résultat StringStream

ToStream() public static méthode

public static ToStream ( this str, Encoding encoding ) : StringStream
str this
encoding System.Text.Encoding
Résultat StringStream