Click or drag to resize

MemoryStreamRead Method

Reads a block of bytes from the current stream and writes the data to buffer.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public override int Read(
	byte[] buffer,
	int offset,
	int count
)

Parameters

buffer  Byte
When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the characters read from the current stream.
offset  Int32
The byte offset in buffer at which to begin reading.
count  Int32
The maximum number of bytes to read.

Return Value

Int32
The total number of bytes written into the buffer. This can be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached before any bytes are read.
Exceptions
ExceptionCondition
ArgumentNullException buffer is null.
ArgumentOutOfRangeException offset or count is negative.
ArgumentException offset subtracted from the buffer length is less than count.
ObjectDisposedException The current stream instance is closed.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also