|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vgrs.xcode.common.Unicode
public class Unicode
A class that provides algorithms to encode/decode a UTF 16 to/from Unicode.
| Field Summary | |
|---|---|
static int |
MAX
This is the maximum value a Unicode codepoint can assume. |
static int |
MIN
This is the minumum value a Unicode codepoint can assume. |
| Constructor Summary | |
|---|---|
Unicode()
|
|
| Method Summary | |
|---|---|
static void |
assertValid(int aInput)
Assert that the specified value is a Unicode codepoint |
static void |
assertValid(int[] aInput)
Assert that the specified values are Unicode codepoints |
static void |
assertValid(Range aRange)
Assert that the specified values are Unicode codepoints |
static char[] |
decode(int aInput)
Convert one unicode to two characters |
static char[] |
decode(int[] aInput)
Decode a sequence of unicode to a character sequence |
static int[] |
encode(char[] aInput)
Encode a character sequence to an array of unicode |
static int |
encode(char aHigh,
char aLow)
Convert two characters to one unicode. |
static boolean |
isValid(int aInput)
Assert that the specified value is a Unicode codepoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX
public static final int MIN
| Constructor Detail |
|---|
public Unicode()
| Method Detail |
|---|
public static void assertValid(int aInput)
throws XcodeException
aInput - A potential Unicode value
XcodeException - if the input is not a Unicode codepoint.
public static void assertValid(int[] aInput)
throws XcodeException
aInput - An array of potential Unicode values
XcodeException - if any input value is not a Unicode codepoint.
public static void assertValid(Range aRange)
throws XcodeException
aRange - An array of potential Unicode values contained within the given
range.
XcodeException - if any input value is not a Unicode codepoint.
public static char[] decode(int aInput)
throws XcodeException
aInput - a unicode value
XcodeException
public static char[] decode(int[] aInput)
throws XcodeException
aInput - array of unicode
XcodeException - if the array of unicode is null or empty
public static int encode(char aHigh,
char aLow)
aHigh - The character serves as high 8 bits of a unicodeaLow - The character serves as low 8 bits of a unicode
public static int[] encode(char[] aInput)
throws XcodeException
aInput - a character sequence
XcodeException - if the input array is null or emptypublic static boolean isValid(int aInput)
aInput - A potential Unicode value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||