Create a memory block stream with an initial memory block of 2048 bytes.
Whether the stream supports reading.
The memory block stream is always readable.
Whether the stream supports writing.
The memory block stream is always writable.
Whether the stream supports seeking.
The memory block stream is always seekable.
The length of the stream, in bytes.
The current position within the stream.
Set the current position within the stream.
Copy the stream data into a newly allocated, contiguous byte array.
The copied array.
Read bytes from the stream.
The buffer to read data into.
The offset into the buffer to start reading data.
The number of bytes to read.
The total number of bytes read into the buffer, or zero if the end of the stream has been reached.
Write bytes to the stream.
The buffer to write.
The offset of the first byte to write.
The number of bytes to write.
Set the position within the stream.
The offset relative to origin.
The reference point used to obtain the new position.
The new position within the stream.
Flush the stream.
Dispose the stream and release its blocks.
Copy data from this stream to another stream.
The stream that will receive the copied data.
The temporary buffer size to use while copying.
Protected StaticvalidateValidate buffer, offset, and count arguments for stream read/write operations.
The buffer supplied by the caller.
The starting offset in the buffer.
The number of bytes to read or write.
Protectedthrow
An efficient memory stream implementation that sacrifices direct access to the internal byte buffer in order to improve performance.
Instead of resizing one internal byte array, the stream chains blocks of non-contiguous memory. This avoids copying old data into newly allocated arrays.