YEnc ReaderDecode To Method
Decode and validate the current block.
Definition
Namespace: MimeKit.Encodings
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void DecodeTo(
Stream destination,
CancellationToken cancellationToken = default
)Parameters
- destination Stream
- The writable destination.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Remarks
Leaves the destination open. It may contain partial or corrupt output if the operation fails;
callers must discard that output. Absent checksums are accepted; present checksums are verified
when they cover this block. Whole-file checksums of partial ranges remain unverified metadata.
Exceptions
| ArgumentNullException | destination is null. |
| ArgumentException | The destination is not writable or is the source stream. |
| FormatException | The block is malformed, truncated, or fails size or checksum validation. |
| InvalidOperationException | There is no pending block or the reader has faulted. |
| ObjectDisposedException | The reader is disposed. |
| OperationCanceledException | The operation was canceled. |
| IOException | An I/O error occurred. |