An engine to transform LogStrings into bytes for the specific character set.
More...
#include <charsetencoder.h>
|
static CharsetEncoderPtr | getDefaultEncoder () |
| Get encoder for default charset.
|
|
static CharsetEncoderPtr | getEncoder (const LogString &charset) |
| Get encoder for specified character set.
|
|
static CharsetEncoderPtr | getUTF8Encoder () |
| Get encoder for UTF-8.
|
|
static void | encode (CharsetEncoderPtr &enc, const LogString &src, LogString::const_iterator &iter, ByteBuffer &dst) |
| Encodes a string replacing unmappable characters with escape sequences.
|
|
static bool | isError (log4cxx_status_t stat) |
| Determines if the return value from encode indicates an unconvertable character.
|
|
static bool | isTriviallyCopyable (const LogString &src, const CharsetEncoderPtr &enc) |
| Is the data of src unchanged by enc .
|
|
An engine to transform LogStrings into bytes for the specific character set.
◆ CharsetEncoder()
log4cxx::helpers::CharsetEncoder::CharsetEncoder |
( |
| ) |
|
|
protected |
◆ ~CharsetEncoder()
virtual log4cxx::helpers::CharsetEncoder::~CharsetEncoder |
( |
| ) |
|
|
virtual |
◆ encode() [1/2]
static void log4cxx::helpers::CharsetEncoder::encode |
( |
CharsetEncoderPtr & |
enc, |
|
|
const LogString & |
src, |
|
|
LogString::const_iterator & |
iter, |
|
|
ByteBuffer & |
dst |
|
) |
| |
|
static |
Encodes a string replacing unmappable characters with escape sequences.
◆ encode() [2/2]
Encodes as many characters from the input string as possible to the output buffer.
- Parameters
-
in | input string |
iter | position in string to start. |
out | output buffer. |
- Returns
- APR_SUCCESS unless a character can not be represented in the encoding.
◆ flush()
virtual void log4cxx::helpers::CharsetEncoder::flush |
( |
ByteBuffer & |
out | ) |
|
|
virtual |
◆ getDefaultEncoder()
static CharsetEncoderPtr log4cxx::helpers::CharsetEncoder::getDefaultEncoder |
( |
| ) |
|
|
static |
Get encoder for default charset.
◆ getEncoder()
static CharsetEncoderPtr log4cxx::helpers::CharsetEncoder::getEncoder |
( |
const LogString & |
charset | ) |
|
|
static |
Get encoder for specified character set.
- Parameters
-
charset | the following values should be recognized: "US-ASCII", "ISO-8859-1", "UTF-8", "UTF-16BE", "UTF-16LE". |
- Returns
- encoder.
- Exceptions
-
◆ getUTF8Encoder()
static CharsetEncoderPtr log4cxx::helpers::CharsetEncoder::getUTF8Encoder |
( |
| ) |
|
|
static |
◆ isError()
Determines if the return value from encode indicates an unconvertable character.
◆ isTriviallyCopyable()
static bool log4cxx::helpers::CharsetEncoder::isTriviallyCopyable |
( |
const LogString & |
src, |
|
|
const CharsetEncoderPtr & |
enc |
|
) |
| |
|
static |
Is the data of src
unchanged by enc
.
◆ reset()
virtual void log4cxx::helpers::CharsetEncoder::reset |
( |
| ) |
|
|
virtual |
Resets any internal state.
The documentation for this class was generated from the following file: