C# Class NContrib.Extensions.StreamExtensions

Afficher le fichier Open project: veracross/ncontrib

Méthodes publiques

Méthode Description
GetMime ( this stream ) : string

Use MIME magic to find the MIME type for this stream.

256 bytes (or the total number of bytes in the stream if 256 are not available) are read from the current stream location to detect the MIME type. If the stream support seeking, the stream position will be moved back after the sample is taken.

ReadAllBytes ( this stream, int bufferSize = 32768 ) : byte[]

Reads the entire contents of a stream into a byte array

Method Details

GetMime() public static méthode

Use MIME magic to find the MIME type for this stream.
256 bytes (or the total number of bytes in the stream if 256 are not available) are read from the current stream location to detect the MIME type. If the stream support seeking, the stream position will be moved back after the sample is taken.
public static GetMime ( this stream ) : string
stream this
Résultat string

ReadAllBytes() public static méthode

Reads the entire contents of a stream into a byte array
public static ReadAllBytes ( this stream, int bufferSize = 32768 ) : byte[]
stream this
bufferSize int
Résultat byte[]