class Poco::Base64Encoder

Overview

This ostream base64-encodes all data written to it and forwards it to a connected ostream. More…

#include <Base64Encoder.h>

class Base64Encoder:
    public Poco::Base64EncoderIOS,
    public ostream
{
public:
    // construction

    Base64Encoder(std::ostream& ostr);
};

Inherited Members

public:
    // methods

    int
    close();

    Base64EncoderBuf*
    rdbuf();

protected:
    // fields

    Base64EncoderBuf _buf;

Detailed Documentation

This ostream base64-encodes all data written to it and forwards it to a connected ostream.

Always call close() when done writing data, to ensure proper completion of the encoding operation.

Note: The characters are directly written to the ostream’s streambuf, thus bypassing the ostream. The ostream’s state is therefore not updated to match the buffer’s state.