MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / AlbiteCharacter

Class AlbiteCharacter

src/org/albite/lang/AlbiteCharacter.java:16–280  ·  view source on GitHub ↗

@author albus

Source from the content-addressed store, hash-verified

14 * @author albus
15 */
16public class AlbiteCharacter {
17
18 public static final byte
19 UNASSIGNED = 0,
20 UPPERCASE_LETTER = 1,
21 LOWERCASE_LETTER = 2,
22 TITLECASE_LETTER = 3,
23 MODIFIER_LETTER = 4,
24 OTHER_LETTER = 5,
25 NON_SPACING_MARK = 6,
26 ENCLOSING_MARK = 7,
27 COMBINING_SPACING_MARK = 8,
28 DECIMAL_DIGIT_NUMBER = 9,
29 LETTER_NUMBER = 10,
30 OTHER_NUMBER = 11,
31 SPACE_SEPARATOR = 12,
32 LINE_SEPARATOR = 13,
33 PARAGRAPH_SEPARATOR = 14,
34 CONTROL = 15,
35 FORMAT = 16,
36 PRIVATE_USE = 18,
37 SURROGATE = 19,
38 DASH_PUNCTUATION = 20,
39 START_PUNCTUATION = 21,
40 END_PUNCTUATION = 22,
41 CONNECTOR_PUNCTUATION = 23,
42 OTHER_PUNCTUATION = 24,
43 MATH_SYMBOL = 25,
44 CURRENCY_SYMBOL = 26,
45 MODIFIER_SYMBOL = 27,
46 OTHER_SYMBOL = 28;
47
48 public static final byte[] X = new byte[1024];
49 public static final short[] Y = new short[4032];
50 public static final int[] A = new int[632];
51
52 static {
53 /*
54 * Load data from external file
55 */
56 InputStream is = (new Object()).getClass()
57 .getResourceAsStream("/res/charmap.bin");
58
59 if (is != null) {
60 DataInputStream in = new DataInputStream(is);
61 try {
62 try {
63 for (int i = 0; i < 1024; i++) {
64 X[i] = in.readByte();
65 }
66
67 for (int i = 0; i < 4032; i++) {
68 Y[i] = in.readShort();
69 }
70
71 for (int i = 0; i < 632; i++) {
72 A[i] = in.readInt();
73 }

Callers

nothing calls this directly

Calls 4

readByteMethod · 0.80
readShortMethod · 0.80
readIntMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected