Methods Summary |
---|
public static final native boolean | canDecode(long converterHandle, byte[] bytes)Ascertains if a given a byte sequence can be converted to Unicode
|
public static final native boolean | canEncode(long converterHandle, int codeUnit)Ascertains if a given Unicode code unit can
be converted to the target encoding
|
public static final native void | closeConverter(long converterHandle)Closes the specified converter and releases the resources
|
public static final native boolean | contains(long converterHandle1, long converterHandle2)Determines whether charset1 contains charset2.
|
public static final native int | convertByteToChar(long converterHandle, byte[] input, int inEnd, char[] output, int outEnd, int[] data, boolean flush)Converts an array of bytes containing characters in an external
encoding into an array of Unicode characters. This method allows
a buffer by buffer conversion of a data stream. The state of the
conversion is saved between calls to convert. Among other things,
this means multibyte input sequences can be split between calls.
If a call to convert results in an Error, the conversion may be
continued by calling convert again with suitably modified parameters.
All conversions should be finished with a call to the flush method.
|
public static final native int | convertCharToByte(long converterHandle, char[] input, int inEnd, byte[] output, int outEnd, int[] data, boolean flush)Converts an array of Unicode chars containing characters in an
external encoding into an array of bytes. This method allows
a buffer by buffer conversion of a data stream. The state of the
conversion is saved between calls to convert. Among other things,
this means multibyte input sequences can be split between calls.
If a call to convert results in an Error, the conversion may be
continued by calling convert again with suitably modified parameters.
All conversions should be finished with a call to the flush method.
|
public static final native int | countAliases(java.lang.String enc)Gets the number of aliases for a converter name
|
public static final native int | countAvailable()Gets the number of converters installed in the current installation of ICU
|
public static final native int | countInvalidBytes(long converterHandle, int[] length)Gets the numnber of invalid bytes in the specified converter object
for the last error that has occured
|
public static final native int | countInvalidChars(long converterHandle, int[] length)Gets the numnber of invalid chars in the specified converter object
for the last error that has occured
|
public static final native int | decode(long converterHandle, byte[] input, int inEnd, char[] output, int outEnd, int[] data, boolean flush)Converts an array of bytes containing characters in an external
encoding into an array of Unicode characters. This method allows
a buffer by buffer conversion of a data stream. The state of the
conversion is saved between calls to convert. Among other things,
this means multibyte input sequences can be split between calls.
If a call to convert results in an Error, the conversion may be
continued by calling convert again with suitably modified parameters.
All conversions should be finished with a call to the flush method.
|
public static final native int | encode(long converterHandle, char[] input, int inEnd, byte[] output, int outEnd, int[] data, boolean flush)Converts an array of Unicode chars containing characters in an
external encoding into an array of bytes. This method allows
a buffer by buffer conversion of a data stream. The state of the
conversion is saved between calls to convert. Among other things,
this means multibyte input sequences can be split between calls.
If a call to convert results in an Error, the conversion may be
continued by calling convert again with suitably modified parameters.
All conversions should be finished with a call to the flush method.
|
public static final native int | flushByteToChar(long converterHandle, char[] output, int outEnd, int[] data)Writes any remaining output to the output buffer and resets the
converter to its initial state.
|
public static final native int | flushCharToByte(long converterHandle, byte[] output, int outEnd, int[] data)Writes any remaining output to the output buffer and resets the
converter to its initial state.
|
public static final native java.lang.String[] | getAliases(java.lang.String enc)Gets the aliases associated with the converter name
|
public static final native java.lang.String[] | getAvailable()Gets the canonical names of available converters
|
public static final native float | getAveBytesPerChar(long converterHandle)Gets the average numnber of bytes needed for converting a char
|
public static final native float | getAveCharsPerByte(long converterHandle)Gets the average numnber of chars needed for converting a byte
|
public static final native java.lang.String | getCanonicalName(java.lang.String enc)Gets the canonical name of the converter
|
public static final native java.lang.String | getICUCanonicalName(java.lang.String enc)Gets the canonical name of the converter as defined by Java
|
public static final native java.lang.String | getJavaCanonicalName(java.lang.String icuCanonicalName)Gets the canonical name of the converter as defined by Java
|
public static final native int | getMaxBytesPerChar(long converterHandle)Gets the number of bytes needed for converting a char
|
public static final native int | getMaxCharsPerByte(long converterHandle)Gets the number of chars needed for converting a byte
|
public static final native int | getMinBytesPerChar(long converterHandle)Gets the number of bytes needed for converting a char
|
public static final native byte[] | getSubstitutionBytes(long converterHandle)
|
public static final native long | openConverter(java.lang.String encoding)Open the converter with the specified encoding
|
public static final native void | resetByteToChar(long converterHandle)Resets the ByteToChar (toUnicode) state of specified converter
|
public static final native void | resetCharToByte(long converterHandle)Resets the CharToByte (fromUnicode) state of specified converter
|
public static final native long | safeClone(long converterHandle)Returns a thread safe clone of the converter
|
public static final native int | setCallbackDecode(long converterHandle, int onMalformedInput, int onUnmappableInput, char[] subChars, int length)Sets the callback to Unicode for ICU conveter. The default behaviour of ICU callback
is to call the specified callback function for both illegal and unmapped sequences.
|
public static final native int | setCallbackEncode(long converterHandle, int onMalformedInput, int onUnmappableInput, byte[] subBytes, int length)Sets the callback from Unicode for ICU conveter. The default behaviour of ICU callback
is to call the specified callback function for both illegal and unmapped sequences.
|
public static final native int | setSubstitutionBytes(long converterHandle, byte[] subChars, int length)Sets the substitution bytes of the specified converter used by decoder
|
public static final native int | setSubstitutionChars(long converterHandle, char[] subChars, int length)Sets the substitution Unicode chars of the specified converter used
by encoder
|
public static final native int | setSubstitutionModeByteToChar(long converterHandle, boolean mode)Sets the substitution mode of CharToByte(fromUnicode) for the specified converter
|
public static final native int | setSubstitutionModeCharToByte(long converterHandle, boolean mode)Sets the substitution mode of CharToByte(fromUnicode) for the specified converter
|