|
BlockAllocatedMemoryStream(Byte[], Int32, Int32) Constructor
|
Namespace: GSF.IOAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.246-beta+ff392465a0262ee2737937d4127fc3c2f08c6dcd
Syntaxpublic BlockAllocatedMemoryStream(
byte[] buffer,
int startIndex,
int length
)
Public Sub New (
buffer As Byte(),
startIndex As Integer,
length As Integer
)
public:
BlockAllocatedMemoryStream(
array<unsigned char>^ buffer,
int startIndex,
int length
)
new :
buffer : byte[] *
startIndex : int *
length : int -> BlockAllocatedMemoryStream
GSF.IO.BlockAllocatedMemoryStream = function(buffer, startIndex, length);
View SourceParameters
- 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.
ExceptionsException | Condition |
---|
ArgumentNullException | buffer is null. |
ArgumentOutOfRangeException | startIndex 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