C# Class HermaFx.StreamExtensions

显示文件 Open project: evicertia/HermaFx

Public Methods

Method Description
ReadAllBytes ( this source ) : byte[]

Reads the contents of the stream into a byte array. data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.

ReadAllBytes ( this source, int initialCapacity ) : byte[]

Reads the contents of the stream into a byte array. data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.

Specifying an initialCapacity allows reducing the amount of double copying and multiple reallocations of internal temporal buffers.

Method Details

ReadAllBytes() public static method

Reads the contents of the stream into a byte array. data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.
The stream does not support reading. Methods were called after the stream was closed. An I/O error occurs.
public static ReadAllBytes ( this source ) : byte[]
source this The source.
return byte[]

ReadAllBytes() public static method

Reads the contents of the stream into a byte array. data is returned as a byte array. An IOException is thrown if any of the underlying IO calls fail.
Specifying an initialCapacity allows reducing the amount of double copying and multiple reallocations of internal temporal buffers.
The stream does not support reading. Methods were called after the stream was closed. An I/O error occurs.
public static ReadAllBytes ( this source, int initialCapacity ) : byte[]
source this The source.
initialCapacity int The initial array capacity.
return byte[]