|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.nio.charset.CharsetEncoder | +--com.ibm.icu4jni.charset.CharsetEncoderICU
Constructor Summary | |
CharsetEncoderICU(java.nio.charset.Charset cs,
long cHandle)
Construcs a new encoder for the given charset |
Method Summary | |
boolean |
canEncode(char c)
Ascertains if a given Unicode character can be converted to the target encoding |
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 void |
finalize()
Releases the system resources by cleanly closing ICU converter opened |
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 |
implReplaceWith(byte[] newReplacement)
Sets this encoders replacement string. |
protected void |
implReset()
Resets the from Unicode mode of converter |
Methods inherited from class java.nio.charset.CharsetEncoder |
averageBytesPerChar, canEncode, charset, encode, encode, flush, isLegalReplacement, malformedInputAction, maxBytesPerChar, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CharsetEncoderICU(java.nio.charset.Charset cs, long cHandle)
cHandle
- the address of ICU converterMethod Detail |
protected void implReplaceWith(byte[] newReplacement)
implReplaceWith
in class java.nio.charset.CharsetEncoder
protected void implOnMalformedInput(java.nio.charset.CodingErrorAction newAction)
implOnMalformedInput
in class java.nio.charset.CharsetEncoder
java.lang.IllegalArgumentException
protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction newAction)
implOnUnmappableCharacter
in class java.nio.charset.CharsetEncoder
java.lang.IllegalArgumentException
protected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer out)
implFlush
in class java.nio.charset.CharsetEncoder
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
public boolean canEncode(char c)
canEncode
in class java.nio.charset.CharsetEncoder
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; } }
- Returns:
- true if a character can be converted
- Status:
- Stable ICU 2.4.
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- exception thrown by super class' finalize method
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |