Reads count bytes from stream into buffer, starting at the byte given by offset.
public static int ReadBlock(this Stream stream, byte[] buffer, int offset, int count)
parameter | description |
---|---|
stream | The stream to read from. |
buffer | The buffer to read data into. |
offset | The offset within the buffer at which data is first written. |
count | The count of bytes to read. |
Unlike Stream.Read, this method will not return fewer bytes than requested unless the end of the stream is reached.