This class implements a mechanism capable of converting data of arbitrary length from its corresponding Base64 representation.

Synopsis

Declared in <bdlde_base64decoder.h>

class Base64Decoder;

Type Aliases

Name

Description

Alphabet

Alias for Base64Alphabet::Enum.

Member Functions

Name

Description

Base64Decoder [constructor]

Constructors

~Base64Decoder [destructor]

Destroy this object.

alphabet

Return the alphabet supplied at construction of this object.

convert

convert overloads

endConvert

endConvert overloads

ignoreMode

Return the ignoreMode state of this decoder.

isAcceptable

Return true if the input read so far is considered syntactically complete, and false otherwise. Note that the number of relevant input characters must be divisible by 4.

isDone

Return true if the current input is acceptable and any additional input (including endConvert) would be an error, and false otherwise. Note that if this decoder isDone then all resulting output has been emitted to out.

isError

Return true if there is no possibility of achieving an "acceptable" result, and false otherwise.

isInitialState

Return true if this instance is in the initial state (i.e., as if no input had been consumed), and false otherwise.

isMaximal

Return true if the current input is acceptable and any additional input (other than endConvert) would be an error, and false otherwise.

isPadded

Return true if this object is configured for padded input and false otherwise.

isUnrecognizedAnError

Return true if this mechanism is currently configured to report an error when an unrecognized character (i.e., a character other than one of the 64 "numeric" base‐64 characters, =, or whitespace) is encountered, and false otherwise.

options

Return a Base64DecoderOptions object representing the configuration of this decoder.

outputLength

Return the total length of the output emitted thus far.

resetState

Reset this instance to its initial state (i.e., as if no input had been consumed).

Static Member Functions

Name

Description

maxDecodedLength

Return the maximum number of decoded bytes that could result from an input byte sequence of the specified inputLength provided to the convert and endConvert methods of this decoder. The behavior is undefined unless 0 <= inputLength. Note that the result is independent of which options are provided to the decoder.

Static Data Members

Name

Description

e_BASIC

Standard Base64 alphabet constant.

e_URL

URL‐safe Base64 alphabet constant.

Created with MrDocs