reads a block of bytes from the stream and writes the data in a given buffer.
<dl></dl>
<dt>array</dt>
when this method returns, contains the specified byte array with the values between offset and (offset + count -
1) replaced by the bytes read from the current source.
<dt>offset</dt>
the byte offset in array at which the read bytes will be placed.
<dt>count</dt>
the maximum number of bytes to read.
the total number of bytes read into the buffer. this might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.
<a target="_blank">exceptions</a>
<a target="_blank"></a>
exception
condition
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.argumentnullexception(v=vs.110).aspx">argumentnullexception</a>
array is null.
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.argumentoutofrangeexception(v=vs.110).aspx">argumentoutofrangeexception</a>
offset or count is negative.
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.notsupportedexception(v=vs.110).aspx">notsupportedexception</a>
the stream does not support reading.
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.io.ioexception(v=vs.110).aspx">ioexception</a>
an i/o error occurred.
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.argumentexception(v=vs.110).aspx">argumentexception</a>
offset and count describe an invalid range in array.
<a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.objectdisposedexception(v=vs.110).aspx">objectdisposedexception</a>
methods were called after the stream was closed.