com.ibm.icu.charset
Class CharsetCallback

java.lang.Object
  extended by com.ibm.icu.charset.CharsetCallback

public class CharsetCallback
extends Object

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.

Status:
Stable ICU 3.6.

Nested Class Summary
static interface CharsetCallback.Decoder
          Decoder Callback interface
static interface CharsetCallback.Encoder
          Encoder Callback interface
 
Field Summary
static CharsetCallback.Encoder FROM_U_CALLBACK_ESCAPE
          Write escape callback
static CharsetCallback.Encoder FROM_U_CALLBACK_SKIP
          Skip callback
static CharsetCallback.Encoder FROM_U_CALLBACK_STOP
          Stop callback
static CharsetCallback.Encoder FROM_U_CALLBACK_SUBSTITUTE
          Write substitute callback
static CharsetCallback.Decoder TO_U_CALLBACK_ESCAPE
          Write escape callback
static CharsetCallback.Decoder TO_U_CALLBACK_SKIP
          Skip callback
static CharsetCallback.Decoder TO_U_CALLBACK_STOP
          Stop callback
static CharsetCallback.Decoder TO_U_CALLBACK_SUBSTITUTE
          Write substitute callback
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FROM_U_CALLBACK_SKIP

public static final CharsetCallback.Encoder FROM_U_CALLBACK_SKIP
Skip callback

Status:
Stable ICU 3.6.

TO_U_CALLBACK_SKIP

public static final CharsetCallback.Decoder TO_U_CALLBACK_SKIP
Skip callback

Status:
Stable ICU 3.6.

FROM_U_CALLBACK_SUBSTITUTE

public static final CharsetCallback.Encoder FROM_U_CALLBACK_SUBSTITUTE
Write substitute callback

Status:
Stable ICU 3.6.

TO_U_CALLBACK_SUBSTITUTE

public static final CharsetCallback.Decoder TO_U_CALLBACK_SUBSTITUTE
Write substitute callback

Status:
Stable ICU 3.6.

FROM_U_CALLBACK_STOP

public static final CharsetCallback.Encoder FROM_U_CALLBACK_STOP
Stop callback

Status:
Stable ICU 3.6.

TO_U_CALLBACK_STOP

public static final CharsetCallback.Decoder TO_U_CALLBACK_STOP
Stop callback

Status:
Stable ICU 3.6.

FROM_U_CALLBACK_ESCAPE

public static final CharsetCallback.Encoder FROM_U_CALLBACK_ESCAPE
Write escape callback

Status:
Stable ICU 4.0.

TO_U_CALLBACK_ESCAPE

public static final CharsetCallback.Decoder TO_U_CALLBACK_ESCAPE
Write escape callback

Status:
Stable ICU 4.0.


Copyright (c) 2012 IBM Corporation and others.