|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.nio.charset.CharsetEncoder
com.ibm.icu4jni.charset.CharsetEncoderICU
| Constructor Summary | |
CharsetEncoderICU(java.nio.charset.Charset cs,
long cHandle,
byte[] replacement)
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)
Deprecated. ICU 3.4 |
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,
byte[] replacement)
cs - for which the decoder is createdcHandle - the address of ICU converterreplacement - the substitution bytes| Method Detail |
protected void implReplaceWith(byte[] newReplacement)
newReplacement - to replace the error chars withprotected void implOnMalformedInput(java.nio.charset.CodingErrorAction newAction)
newAction - action to be taken
java.lang.IllegalArgumentExceptionprotected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction newAction)
newAction - action to be taken
java.lang.IllegalArgumentExceptionprotected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer out)
out - action to be taken
protected void implReset()
protected java.nio.charset.CoderResult encodeLoop(java.nio.CharBuffer in,
java.nio.ByteBuffer out)
in - buffer to decodeout - buffer to populate with decoded result
public boolean canEncode(char c)
c - the character to be converted
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
- Note, ICU 3.4.
- Status:
- Obsolete. Will be removed in ICU 2.4.
protected void finalize()
throws java.lang.Throwable
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 | ||||||||||