Measuring StreamRead(Byte, Int 32, Int 32) Method
Read a sequence of bytes from the stream and advances the position
within the stream by the number of bytes read.
Definition
Namespace: MimeKit.IO
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public override int Read(
byte[] buffer,
int offset,
int count
)Parameters
- buffer Byte
- The buffer to read data into.
- offset Int32
- The offset into the buffer to start reading data.
- count Int32
- The number of bytes to read.
Return Value
Int32The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
Remarks
Reading from a MeasuringStream is not supported.
Exceptions
| ObjectDisposedException | The stream has been disposed. |
| NotSupportedException | The stream does not support reading. |