BloombergLP::bdlde::QuotedPrintableEncoder::endConvert

Finish encoding and write any retained output to out.

Synopsis

Declared in <bdlde_quotedprintableencoder.h>

int
endConvert(
    char* out,
    int* numOut,
    int maxNumOut = -1);

Description

Terminate encoding for this encoder; write any retained output (e.g., from a previous call to convert with a non-zero maxNumOut argument) to the specified out buffer. Optionally specify the maxNumOut limit on the number of bytes to output; if maxNumOut is negative, no limit is imposed. Load into the specified numOut the number of output bytes produced. Return a non-negative value on success and a negative value otherwise. A successful return status indicates the number of characters that would be output if endConvert were called subsequently with no output limit. Any retained bytes are available on a subsequent call to endConvert. Once this method is called, no additional input may be supplied without an intervening call to reset; once this method returns a zero status, a subsequent call will place this encoder in the error state, and return an error status.

Return Value

a non-negative value on success (the number of characters that would be output if endConvert were called with no limit), and a negative value otherwise

Parameters

NameDescription
outbuffer to receive any retained encoded characters
numOutreceives the number of output bytes produced
maxNumOutmaximum output bytes to emit; negative means no limit