|
|||||||||
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 sematics of ICU4C.
Method Summary | |
---|---|
boolean |
canEncode(int codepoint)
Ascertains if a given Unicode code point (32bit value for handling surrogates) can be converted to the target encoding. |
protected java.nio.charset.CoderResult |
encodeLoop(java.nio.CharBuffer in,
java.nio.ByteBuffer out)
Encodes one or more chars. |
protected java.nio.charset.CoderResult |
implFlush(java.nio.ByteBuffer out)
Flushes any characters saved in the converter's internal buffer and resets the converter. |
protected void |
implOnMalformedInput(java.nio.charset.CodingErrorAction newAction)
Sets the action to be taken if an illegal sequence is encountered |
protected void |
implOnUnmappableCharacter(java.nio.charset.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 |
isLegalReplacement(byte[] repl)
Overrides super class method |
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 |
---|
protected void implOnMalformedInput(java.nio.charset.CodingErrorAction newAction)
implOnMalformedInput
in class java.nio.charset.CharsetEncoder
newAction
- action to be taken
java.lang.IllegalArgumentException
protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction newAction)
implOnUnmappableCharacter
in class java.nio.charset.CharsetEncoder
newAction
- action to be taken
java.lang.IllegalArgumentException
protected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer out)
implFlush
in class java.nio.charset.CharsetEncoder
out
- action to be taken
protected void implReset()
implReset
in class java.nio.charset.CharsetEncoder
protected java.nio.charset.CoderResult encodeLoop(java.nio.CharBuffer in, java.nio.ByteBuffer out)
encodeLoop
in class java.nio.charset.CharsetEncoder
in
- buffer to decodeout
- buffer to populate with decoded result
public boolean canEncode(int codepoint)
while(ior String src = new String(mySource); int i,codepoint; boolean passed = false; while(i0xfff)? 2:1; if(!(CharsetEncoderICU) myConv).canEncode(codepoint)){ passed = false; } }
- Parameters:
codepoint
- Unicode code point as int value- Returns:
- true if a character can be converted
public boolean isLegalReplacement(byte[] repl)
isLegalReplacement
in class java.nio.charset.CharsetEncoder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |