Top Description Fields Constructors Methods
com.ibm.icu.impl

public final Class UCharacterUtility

extends Object
Class Inheritance

Internal character utility class for simple data type conversion and String parsing functions. Does not have an analog in the JDK.
Author
Syn Wee Quek
Since
sep2900

Field Summary

Modifier and TypeField and Description
private static final int
NON_CHARACTER_MAX_3_1_

New non character range in Unicode 3.1

private static final int
NON_CHARACTER_MIN_3_1_

New minimum non character in Unicode 3.1

private static final int
NON_CHARACTER_SUFFIX_MIN_3_0_

Minimum suffix value that indicates if a character is non character.

Constructor Summary

AccessConstructor and Description
private
UCharacterUtility()

private constructor to avoid initialization

Method Summary

Modifier and TypeMethod and Description
pack-priv static int

Returns:

the end position of the substring within str if matches otherwise a -1
compareNullTermByteSubString
(String
string to compare
str
,
byte[]
byte array
array
,
int
index within str to start comparing
strindex
,
int
array index to start in byte count
aindex
)

Compares a null terminated substring from an array of bytes.

pack-priv static int

Returns:

the end position of the substring within the character array
getNullTermByteSubString
(StringBuffer
stringbuffer to store data in, data will be store with each byte as a char
str
,
byte[]
byte array
array
,
int
to start substring in byte count
index
)

Retrieves a null terminated substring from an array of bytes.

public static boolean

Returns:

true if codepoint is a non character false otherwise
isNonCharacter
(int
codepoint
ch
)

Determines if codepoint is a non character

pack-priv static int

Returns:

the number of bytes skipped
skipByteSubString
(byte[]
byte array to parse
array
,
int
to start substrings in byte count
index
,
int
the max number of bytes to skip
length
,
byte
value of byte to skip to
skipend
)

skip substrings from an array of characters, where each character is a set of 2 bytes.

pack-priv static int

Returns:

the end position of the substrings within the character array
skipNullTermByteSubString
(byte[]
byte array
array
,
int
to start substrings in byte count
index
,
int
number of null terminated substrings to skip
skipcount
)

Skip null terminated substrings from an array of bytes.

pack-priv static int

Returns:

int form
toInt
(char
most significant char
msc
,
char
least significant char
lsc
)

joining 2 chars to form an int

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

NON_CHARACTER_MAX_3_1_back to summary
private static final int NON_CHARACTER_MAX_3_1_

New non character range in Unicode 3.1

NON_CHARACTER_MIN_3_1_back to summary
private static final int NON_CHARACTER_MIN_3_1_

New minimum non character in Unicode 3.1

NON_CHARACTER_SUFFIX_MIN_3_0_back to summary
private static final int NON_CHARACTER_SUFFIX_MIN_3_0_

Minimum suffix value that indicates if a character is non character. Unicode 3.0 non characters

Constructor Detail

UCharacterUtilityback to summary
private UCharacterUtility()

private constructor to avoid initialization

Method Detail

compareNullTermByteSubStringback to summary
pack-priv static int compareNullTermByteSubString(String str, byte[] array, int strindex, int aindex)

Compares a null terminated substring from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. if the first byte is a zero, the next byte will be taken as the first byte.

Parameters
str:String

string to compare

array:byte[]

byte array

strindex:int

index within str to start comparing

aindex:int

array index to start in byte count

Returns:int

the end position of the substring within str if matches otherwise a -1

getNullTermByteSubStringback to summary
pack-priv static int getNullTermByteSubString(StringBuffer str, byte[] array, int index)

Retrieves a null terminated substring from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. If the first byte is a zero, the next byte will be taken as the first byte.

Parameters
str:StringBuffer

stringbuffer to store data in, data will be store with each byte as a char

array:byte[]

byte array

index:int

to start substring in byte count

Returns:int

the end position of the substring within the character array

isNonCharacterback to summary
public static boolean isNonCharacter(int ch)

Determines if codepoint is a non character

Parameters
ch:int

codepoint

Returns:boolean

true if codepoint is a non character false otherwise

skipByteSubStringback to summary
pack-priv static int skipByteSubString(byte[] array, int index, int length, byte skipend)

skip substrings from an array of characters, where each character is a set of 2 bytes. substring is a set of non-zero bytes starting from argument start to the byte of the argument value. skips up to a max number of characters

Parameters
array:byte[]

byte array to parse

index:int

to start substrings in byte count

length:int

the max number of bytes to skip

skipend:byte

value of byte to skip to

Returns:int

the number of bytes skipped

skipNullTermByteSubStringback to summary
pack-priv static int skipNullTermByteSubString(byte[] array, int index, int skipcount)

Skip null terminated substrings from an array of bytes. Substring is a set of non-zero bytes starting from argument start to the next zero byte. If the first byte is a zero, the next byte will be taken as the first byte.

Parameters
array:byte[]

byte array

index:int

to start substrings in byte count

skipcount:int

number of null terminated substrings to skip

Returns:int

the end position of the substrings within the character array

toIntback to summary
pack-priv static int toInt(char msc, char lsc)

joining 2 chars to form an int

Parameters
msc:char

most significant char

lsc:char

least significant char

Returns:int

int form