5 #include <libutl/Encoder.h> 45 setOutputStream(os, owner);
70 if (_owner)
delete _os;
76 void process(
const byte_t* data,
size_t dataLen);
99 setOutputStream(
nullptr);
140 setOutputStream(os, owner);
165 if (_owner)
delete _os;
171 void process(
const byte_t* data,
size_t dataLen);
188 setOutputStream(
nullptr);
228 start(mode, stream, owner);
231 virtual size_t encode(
const byte_t* block,
size_t num);
233 virtual size_t decode(
byte_t* block,
size_t num);
241 void start(
uint_t mode,
Stream* stream,
bool owner =
true);
244 virtual void clear();
245 virtual void finishEncoding();
246 virtual size_t finishDecoding();
252 _codec.object =
nullptr;
bool streamOwner() const
Get the ownership flag for the output stream.
void deInit()
De-initialize UTL++.
Encoder/decoder abstraction.
Stream * stream() const
Get the output stream.
Decode binary data that was encoded using Base64 (the MIME / RFC 2045 encoding).
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
unsigned char byte_t
Unsigned character.
Base64encoder(uint_t mode, Stream *stream, bool owner=true)
Constructor.
unsigned int uint32_t
Unsigned 32-bit integer.
Base64encode(utl::Stream *os, bool owner=false)
Constructor.
Base64decode(utl::Stream *os, bool owner=false)
Constructor.
void setOutputStream(Stream *os, bool owner=false)
Set output stream.
Stream * stream() const
Get the output stream.
unsigned int uint_t
Unsigned integer.
void setOutputStream(Stream *os, bool owner=false)
Set output stream.
#define UTL_CLASS_NO_COMPARE
Declare that a class cannot do compare().
Encode binary data using Base64 (the MIME / RFC 2045 encoding).
#define UTL_CLASS_NO_COPY
Declare that a class cannot do copy().
bool streamOwner() const
Get the ownership flag for the output stream.
Root of UTL++ class hierarchy.
Base64 encoder/decoder stream.
void init()
Initialize UTL++.