Package com.ibm.icu.charset
Class CharsetCallback
java.lang.Object
com.ibm.icu.charset.CharsetCallback
Callback API for CharsetICU API
CharsetCallback class defines some error behaviour functions called by CharsetDecoderICU and CharsetEncoderICU. The class also provides the facility by which clients can write their own callbacks. These functions, although public, should NEVER be called directly. They should be used as parameters to the onUmappableCharacter() and onMalformedInput() methods, to set the behaviour of a converter when it encounters UNMAPPED/INVALID sequences. Currently the only way to set callbacks is by using CodingErrorAction. In the future we will provide set methods on CharsetEncoder and CharsetDecoder that will accept CharsetCallback fields.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Decoder Callback interfacestatic interface
Encoder Callback interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
static final CharsetCallback.Encoder
Write escape callbackstatic final CharsetCallback.Encoder
Skip callbackstatic final CharsetCallback.Encoder
Stop callbackstatic final CharsetCallback.Encoder
Write substitute callbackprivate static final char[]
private static final char[]
private static final String
static final CharsetCallback.Decoder
Write escape callbackstatic final CharsetCallback.Decoder
Skip callbackstatic final CharsetCallback.Decoder
Stop callbackstatic final CharsetCallback.Decoder
Write substitute callbackprivate static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
private static final int
itou
(char[] buffer, int sourceIndex, int i, int radix, int minwidth) Java port of uprv_itou() in ICU4C used by TO_U_CALLBACK_ESCAPE and FROM_U_CALLBACK_ESCAPE.
-
Field Details
-
SUB_STOP_ON_ILLEGAL
- See Also:
-
ESCAPE_JAVA
- See Also:
-
ESCAPE_C
- See Also:
-
ESCAPE_XML_DEC
- See Also:
-
ESCAPE_XML_HEX
- See Also:
-
ESCAPE_UNICODE
- See Also:
-
ESCAPE_CSS2
- See Also:
-
FROM_U_CALLBACK_SKIP
Skip callback -
TO_U_CALLBACK_SKIP
Skip callback -
FROM_U_CALLBACK_SUBSTITUTE
Write substitute callback -
kSubstituteChar1
private static final char[] kSubstituteChar1 -
kSubstituteChar
private static final char[] kSubstituteChar -
TO_U_CALLBACK_SUBSTITUTE
Write substitute callback -
FROM_U_CALLBACK_STOP
Stop callback -
TO_U_CALLBACK_STOP
Stop callback -
VALUE_STRING_LENGTH
private static final int VALUE_STRING_LENGTH- See Also:
-
UNICODE_PERCENT_SIGN_CODEPOINT
private static final char UNICODE_PERCENT_SIGN_CODEPOINT- See Also:
-
UNICODE_U_CODEPOINT
private static final char UNICODE_U_CODEPOINT- See Also:
-
UNICODE_X_CODEPOINT
private static final char UNICODE_X_CODEPOINT- See Also:
-
UNICODE_RS_CODEPOINT
private static final char UNICODE_RS_CODEPOINT- See Also:
-
UNICODE_U_LOW_CODEPOINT
private static final char UNICODE_U_LOW_CODEPOINT- See Also:
-
UNICODE_X_LOW_CODEPOINT
private static final char UNICODE_X_LOW_CODEPOINT- See Also:
-
UNICODE_AMP_CODEPOINT
private static final char UNICODE_AMP_CODEPOINT- See Also:
-
UNICODE_HASH_CODEPOINT
private static final char UNICODE_HASH_CODEPOINT- See Also:
-
UNICODE_SEMICOLON_CODEPOINT
private static final char UNICODE_SEMICOLON_CODEPOINT- See Also:
-
UNICODE_PLUS_CODEPOINT
private static final char UNICODE_PLUS_CODEPOINT- See Also:
-
UNICODE_LEFT_CURLY_CODEPOINT
private static final char UNICODE_LEFT_CURLY_CODEPOINT- See Also:
-
UNICODE_RIGHT_CURLY_CODEPOINT
private static final char UNICODE_RIGHT_CURLY_CODEPOINT- See Also:
-
UNICODE_SPACE_CODEPOINT
private static final char UNICODE_SPACE_CODEPOINT- See Also:
-
FROM_U_CALLBACK_ESCAPE
Write escape callback -
TO_U_CALLBACK_ESCAPE
Write escape callback
-
-
Constructor Details
-
CharsetCallback
private CharsetCallback()
-
-
Method Details
-
IS_DEFAULT_IGNORABLE_CODE_POINT
private static boolean IS_DEFAULT_IGNORABLE_CODE_POINT(int c) -
itou
private static final int itou(char[] buffer, int sourceIndex, int i, int radix, int minwidth) Java port of uprv_itou() in ICU4C used by TO_U_CALLBACK_ESCAPE and FROM_U_CALLBACK_ESCAPE. Fills in a char string with the radix-based representation of a number padded with zeroes to minwidth.
-