IMime DecoderDecode Method
Decode the specified input into the output buffer.
Definition
Namespace: MimeKit.Encodings
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The number of bytes written to the output buffer.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
int Decode(
byte[] input,
int startIndex,
int length,
byte[] output
)Parameters
- input Byte
- The input buffer.
- startIndex Int32
- The starting index of the input buffer.
- length Int32
- The length of the input buffer.
- output Byte
- The output buffer.
Return Value
Int32The number of bytes written to the output buffer.
Remarks
Decodes the specified input into the output buffer.
The output buffer should be large enough to hold all the decoded input. For estimating the size needed for the output buffer, see EstimateOutputLength(Int32).
Exceptions
| ArgumentNullException |
input is . -or- output is . |
| ArgumentOutOfRangeException | startIndex and length do not specify a valid range in the input byte array. |
| ArgumentException |
output is not large enough to contain the encoded content. Use the EstimateOutputLength(Int32) method to properly determine the necessary length of the output byte array. |