MemoryMappedViewStream: ReadBlock |
Reads the specified number of bytes into the specified array.
Public Function ReadBlock( Buffer ( ) As Byte, ByVal Offset As Long, ByVal Count As Long ) As Long
The offset parameter gives the offset of the byte in the array parameter (the buffer index) at which to begin reading, and the count parameter gives the maximum number of bytes to be read from this stream. The returned value is the actual number of bytes read, or zero if the end of the stream is reached.
Exception | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
NotSupportedException | The CanRead property is set to False. |
ArgumentNullException | The Buffer parameter is set to null. |
ArgumentOutOfRangeException |
The Offset parameter is less than lower bound of Buffer. - or - The Count parameter is less than zero. |
ArgumentException | The Offset parameter plus the Count parameter is greater than the upper bound of the buffer array. |