#include <Decoder.h>
Inheritance diagram for acdk::locale::Decoder:
Public Member Functions | |
Decoder (IN(REncoding) encoding, CodingErrorAction onMalformed=ReportCodingError, CodingErrorAction onUnmappable=ReportCodingError) | |
Please refer to RDecoder getDecoder(CodingErrorAction onMalformed = ReportCodingError, CodingErrorAction onUnmappable = ReplaceCodingError). | |
virtual REncoding | getEncoding () |
return the matchin encoder to this decoder | |
RString | getDecodingReplacement () |
return the bytes which should be written in case of unmappable characters | |
void | setDecodingReplacement (IN(RString) replacement) |
set the replace string for unmappable character | |
CodingErrorAction | malformedInputAction () |
CodingErrorAction | unmappableCharacterAction () |
void | onUnmappableCharacter (CodingErrorAction newAction) |
void | onMalformedInput (CodingErrorAction newAction) |
int | bytesReaded () |
return the bytes readed by this Decoder | |
virtual void | reset () |
reset the read byte counter | |
virtual int | decodeToChar (IN(acdk::io::RReader) in)=0 |
decodes one char | |
virtual RString | decodeToString (IN(acdk::io::RReader) in, int stopOn=-1)=0 |
decodes from a byte stream to a string. | |
virtual RString | decode (IN(RString) str)=0 |
decodes a string from one encoding to another | |
RString | handleUnmappable (uc2char ch) |
implementation to handle unmappable character/bytes | |
Protected Attributes | |
CodingErrorAction | _onMalformedInput |
CodingErrorAction | _onUnmappableCharacter |
RString | _decodingReplacement |
REncoding | _encoding |
int | _bytesReaded |
|
Please refer to RDecoder getDecoder(CodingErrorAction onMalformed = ReportCodingError, CodingErrorAction onUnmappable = ReplaceCodingError).
|
|
return the bytes readed by this Decoder
|
|
decodes a string from one encoding to another
Implemented in acdk::locale::AsciiDecoder, acdk::locale::AsciiUtfDecoder, acdk::locale::ByteAsciiDecoder, acdk::locale::CEscapeDecoder, acdk::locale::IsoDecoder, acdk::locale::UCS2Decoder, acdk::locale::UTF8Decoder, and acdk::net::URLDecoder. |
|
decodes one char
Implemented in acdk::locale::AsciiDecoder, acdk::locale::AsciiUtfDecoder, acdk::locale::ByteAsciiDecoder, acdk::locale::CEscapeDecoder, acdk::locale::IsoDecoder, acdk::locale::UCS2Decoder, acdk::locale::UTF8Decoder, and acdk::net::URLDecoder. |
|
decodes from a byte stream to a string. In normal cases the String contains a Ascii encoding if only 7bit character are in the byte stream.
Implemented in acdk::locale::AsciiDecoder, acdk::locale::AsciiUtfDecoder, acdk::locale::ByteAsciiDecoder, acdk::locale::CEscapeDecoder, acdk::locale::IsoDecoder, acdk::locale::UCS2Decoder, acdk::locale::UTF8Decoder, and acdk::net::URLDecoder. |
|
return the bytes which should be written in case of unmappable characters
|
|
return the matchin encoder to this decoder
|
|
implementation to handle unmappable character/bytes
|
|
|
|
|
|
|
|
reset the read byte counter
|
|
set the replace string for unmappable character
|
|
|
|
|
|
|
|
|
|
|
|
|