|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hcrypto.cipher.AlphabetFactory
Field Summary | |
static int |
ALPH_ascii
|
static int |
ALPH_az
|
static int |
ALPH_AZ
|
static int |
ALPH_azAZ
|
static int |
ALPH_azAZ09
|
static int |
ALPH_cryptogram
|
static int |
ALPH_hebrew
|
static int |
ALPH_printable
|
static int |
ALPH_unicode
|
static int |
MAX_ALPH_NUM
The Alphabets are are numbered 0 through MAX_ALPH_NUM. |
static int |
MAX_CHARS
|
Constructor Summary | |
AlphabetFactory()
|
Method Summary | |
static java.lang.String |
getDesc(int num)
Returns a String description that specifies the range of the alphabet |
static Alphabet |
getInstance(char[] ranges)
Returns an Alphabet instance, constructed from an array subranges specified by their 16-bit Unicodes. |
static Alphabet |
getInstance(java.lang.Character.UnicodeBlock[] blocks)
Returns an Alphabet instance, constructed from an array of Unicode blocks |
static Alphabet |
getInstance(int rangeId)
Returns an Alphabet instance, constructed from a range identifier |
static Alphabet |
getInstance(java.lang.String alphaDesc)
This factory method returns an alphabet constructed from a string that describes the Unicode ranges that make up the alphabet. |
static char |
getRangeHigh(java.lang.String alphDesc)
|
static int |
getRangeId(java.lang.String alphDesc)
Returns the int ID for a given valid alphabet String descriptor and returns -1 for an invalid descriptor. |
static char |
getRangeLow(java.lang.String alphDesc)
|
static char[] |
getRanges(java.lang.Character.UnicodeBlock[] blocks)
Returns a character array of starting and ending char values for each of the Unicode ranges contained in its parameter. |
static char[] |
getRanges(int id)
|
static char[] |
getRanges(java.lang.String alphaDesc)
Returns a character array of starting and ending char values for each of the Unicode ranges included in this alphabet. |
static boolean |
isValidAlphabetSpec(java.lang.String spec)
Returns true iff its String parameter represents a valid alphabet ID. |
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_ALPH_NUM
public static final int MAX_CHARS
public static final int ALPH_az
public static final int ALPH_AZ
public static final int ALPH_azAZ
public static final int ALPH_azAZ09
public static final int ALPH_printable
public static final int ALPH_ascii
public static final int ALPH_cryptogram
public static final int ALPH_unicode
public static final int ALPH_hebrew
Constructor Detail |
public AlphabetFactory()
Method Detail |
public static Alphabet getInstance(char[] ranges) throws java.lang.Exception
ranges
- -- an array of Unicode values specifying the
disjoint subranges of the Alphabet.public static Alphabet getInstance(java.lang.Character.UnicodeBlock[] blocks) throws java.lang.Exception
blocks
- -- an array of Unicode character blockspublic static Alphabet getInstance(int rangeId) throws java.lang.Exception
rangeId
- -- an int specifying one of the
disjoint subranges of the Alphabet.public static Alphabet getInstance(java.lang.String alphaDesc) throws java.lang.Exception
alphaDesc
- a String of the form "az+AZ+UnicodeBlock.GREEK"
where each of the substrings separated by '+' are descriptors
for contiguous ranges of the Unicode character sequence.public static char getRangeLow(java.lang.String alphDesc) throws java.lang.Exception
public static char getRangeHigh(java.lang.String alphDesc) throws java.lang.Exception
public static char[] getRanges(java.lang.String alphaDesc)
alphaDesc
- a String of the form "az+AZ+Range.04+UnicodeBlock.GREEK"
where "GREEK" must be a valid name of one of the
Character.UnicodeBlock ranges.public static char[] getRanges(java.lang.Character.UnicodeBlock[] blocks)
blocks
- an array of UnicodeBlocks, such as
[Character.UnicodeBlock.GREEK, Character.UnicodeBlock.KATAKANA]public static char[] getRanges(int id)
public static java.lang.String getDesc(int num)
num
- is an int specifying the alphabet ID which should be between
0 and MAX_ALPH_NUM.public static int getRangeId(java.lang.String alphDesc) throws java.lang.Exception
alphDesc
- a String specifying the descriptor, which should
be one of: az, AZ, azAZ, azAZ09, printable, asciipublic static boolean isValidAlphabetSpec(java.lang.String spec)
spec
- a String specifying the descriptor, which should
be one of: az, AZ, azAZ, azAZ09, printable, ascii
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |