BloombergLP::bdlde::Base64Encoder::convert

Encode input bytes from [begin, end)] into Base64 at out.

Synopsis

Declared in <bdlde_base64encoder.h>

template<
    class OUTPUT_ITERATOR,
    class INPUT_ITERATOR>
int
convert(
    OUTPUT_ITERATOR out,
    INPUT_ITERATOR begin,
    INPUT_ITERATOR end);

Description

Encode the sequence of input characters starting at the specified begin position up to, but not including, the specified end position, writing any resulting output characters to the specified out buffer. Return a non-negative value on success and a negative value otherwise. Note that calling this method after endConvert has been invoked without an intervening resetState call will place this instance in an error state, and return an error status. Note also that it is recommended that after all calls to convert are finished, the endConvert method be called to complete the encoding of any unprocessed input characters that do not complete a 3-byte sequence.

Return Value

a non-negative value on success, and a negative value otherwise

Parameters

NameDescription
outoutput iterator for encoded characters
beginbeginning of the input byte range
endend of the input byte range (one past the last byte)