|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.nio.charset.CharsetEncoder
com.ibm.icu.charset.CharsetEncoderICU
public abstract class CharsetEncoderICU
An abstract class that provides framework methods of decoding operations for concrete subclasses. In the future this class will contain API that will implement converter semantics of ICU4C.
Method Summary | |
---|---|
protected CoderResult |
encodeLoop(CharBuffer in,
ByteBuffer out)
Encodes one or more chars. |
protected CoderResult |
implFlush(ByteBuffer out)
Flushes any characters saved in the converter's internal buffer and resets the converter. |
protected void |
implOnMalformedInput(CodingErrorAction newAction)
Sets the action to be taken if an illegal sequence is encountered |
protected void |
implOnUnmappableCharacter(CodingErrorAction newAction)
Sets the action to be taken if an illegal sequence is encountered |
protected void |
implReset()
Resets the from Unicode mode of converter |
boolean |
isFallbackUsed()
Is this Encoder allowed to use fallbacks? |
boolean |
isLegalReplacement(byte[] repl)
Overrides super class method |
void |
setFallbackUsed(boolean usesFallback)
Sets whether this Encoder can use fallbacks? |
void |
setFromUCallback(CoderResult err,
CharsetCallback.Encoder newCallback,
Object newContext)
Sets the callback encoder method and context to be used if an illegal sequence is encounterd. |
void |
setFromUContext(Object newContext)
Sets fromUContext used in callbacks. |
Methods inherited from class java.nio.charset.CharsetEncoder |
---|
averageBytesPerChar, canEncode, canEncode, charset, encode, encode, flush, implReplaceWith, malformedInputAction, maxBytesPerChar, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isFallbackUsed()
public void setFallbackUsed(boolean usesFallback)
usesFallback
- true if the user wants the converter to take
advantage of the fallback mapping, false otherwise.protected void implOnMalformedInput(CodingErrorAction newAction)
implOnMalformedInput
in class CharsetEncoder
newAction
- action to be taken
IllegalArgumentException
protected void implOnUnmappableCharacter(CodingErrorAction newAction)
implOnUnmappableCharacter
in class CharsetEncoder
newAction
- action to be taken
IllegalArgumentException
public final void setFromUCallback(CoderResult err, CharsetCallback.Encoder newCallback, Object newContext)
err
- CoderResultnewCallback
- CharsetCallback.EncodernewContext
- Objectpublic final void setFromUContext(Object newContext)
newContext
- Object
IllegalArgumentException
protected CoderResult implFlush(ByteBuffer out)
implFlush
in class CharsetEncoder
out
- action to be taken
protected void implReset()
implReset
in class CharsetEncoder
protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out)
encodeLoop
in class CharsetEncoder
in
- buffer to decodeout
- buffer to populate with decoded result
public boolean isLegalReplacement(byte[] repl)
isLegalReplacement
in class CharsetEncoder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |