IMimeDecoderFlush Method

Decode the final input, flushing any buffered input to the output.

Definition

Namespace: MimeKit.Encodings
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
int Flush(
	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

Int32
The number of bytes written to the output buffer.

Remarks

Call this method at the end of the encoded content, even if the final input is empty. Recoverable bytes are decoded and incomplete quoted-printable or percent escapes are preserved literally. Fragments that cannot produce a byte are discarded.

Use EstimateOutputLength(Int32) to size the output buffer, including any buffered input. Repeated calls with empty input produce no additional output. Call Reset before decoding another stream.

Exceptions

ArgumentNullException input or output is .
ArgumentOutOfRangeException startIndex and length do not specify a valid range in the input byte array.
ArgumentException output is smaller than EstimateOutputLength(Int32) requires.

See Also