Click or drag to resize

BlockAllocatedMemoryStream(Byte, Int32, Int32) Constructor

Initializes a new instance of BlockAllocatedMemoryStream from specified region of buffer.

Namespace: GSF.IO
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.296-beta+d85e3b6b23676c9fffb3231e358b4f94ad70793d
Syntax
public BlockAllocatedMemoryStream(
	byte[] buffer,
	int startIndex,
	int length
)
View Source

Parameters

buffer  Byte
Initial buffer to copy into stream.
startIndex  Int32
0-based start index into the buffer.
length  Int32
Valid number of bytes within buffer from startIndex.
Exceptions
ExceptionCondition
ArgumentNullExceptionbuffer is null.
ArgumentOutOfRangeExceptionstartIndex or length is less than 0 -or- startIndex and length will exceed buffer length.
Remarks
Unlike MemoryStream, the BlockAllocatedMemoryStream will not use the provided buffer as its backing buffer. The buffer will be copied into internally managed reusable memory buffers. Subsequently, the notion of a non-expandable stream is not supported.
See Also