|
Apache Log4cxx
Version 1.4.0
|
An engine to transform LogStrings into bytes for the specific character set. More...
#include <charsetencoder.h>
Public Member Functions | |
| virtual | ~CharsetEncoder () |
| Destructor. | |
| virtual log4cxx_status_t | encode (const LogString &in, LogString::const_iterator &iter, ByteBuffer &out)=0 |
| Encodes as many characters from the input string as possible to the output buffer. | |
| virtual void | reset () |
| Resets any internal state. | |
| virtual void | flush (ByteBuffer &out) |
| Flushes the encoder. | |
Public Member Functions inherited from log4cxx::helpers::Object | |
| virtual | ~Object () |
| virtual const helpers::Class & | getClass () const =0 |
| virtual bool | instanceof (const Class &clazz) const =0 |
| virtual const void * | cast (const Class &clazz) const =0 |
Static Public Member Functions | |
| 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. | |
Protected Member Functions | |
| CharsetEncoder () | |
| Protected constructor. | |
An engine to transform LogStrings into bytes for the specific character set.
|
protected |
Protected constructor.
|
virtual |
Destructor.
|
static |
Encodes a string replacing unmappable characters with escape sequences.
|
pure virtual |
Encodes as many characters from the input string as possible to the output buffer.
| in | input string |
| iter | position in string to start. |
| out | output buffer. |
|
virtual |
Flushes the encoder.
|
static |
Get encoder for default charset.
|
static |
Get encoder for specified character set.
| charset | the following values should be recognized: "US-ASCII", "ISO-8859-1", "UTF-8", "UTF-16BE", "UTF-16LE". |
| IllegalArgumentException | if encoding is not recognized. |
|
static |
Get encoder for UTF-8.
|
inlinestatic |
Determines if the return value from encode indicates an unconvertable character.
|
static |
Is the data of src unchanged by enc.