MemoryMappedViewStream: WriteBlock

WriteBlock

Writes a block of bytes to the current stream using data from a buffer.



 Public Sub WriteBlock(
	  Buffer ( ) As Byte,
	  ByVal Offset As Long,
	  ByVal Count As Long )

Parameters

Buffer
[ByRef] Byte. The byte array from which to copy bytes to the current stream.
Offset
[ByVal] Long. The offset in the buffer at which to begin copying bytes to the current stream.
Count
[ByVal] Long. The number of bytes to write to the current stream.

Remarks

Writing occurs at the current position in the stream.

Exceptions

Exception Condition
ObjectDisposedExceptionThe stream is closed.
NotSupportedException The underlying memory does not support writing.
- or -
An attempt is made to write to the stream and the CanWrite property is False.
- or -
The Count value is greater than the capacity of the stream.
- or -
The position is at the end of the stream capacity.
IOExceptionAn I/O error occurs.
ArgumentOutOfRangeException The Offset parameter is less than the lower bound of the buffer array.
- or -
The Count parameter is less than zero.
ArgumentExceptionThe Offset parameter plus the Count parameter is greater than the upper bound of the buffer array.
ArgumentNullExceptionThe Buffer parameter is null.

See Also

Project CorLib Overview

Class MemoryMappedViewStream Overview