UCharacterUtility.java
1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.agl.impl;
public final class UCharacterUtility {
public static boolean isNonCharacter(int ch) {
if ((ch & 65534) == 65534) {
return true;
}
return ch >= 64976 && ch <= 65007;
}
static int toInt(char msc, char lsc) {
return msc << 16 | lsc;
}
static int compareNullTermByteSubString(String str, byte[] array, int strindex, int aindex) {
byte b = 1;
int length = str.length();
while (b != 0) {
b = array[aindex];
++aindex;
if (b == 0) break;
if (strindex == length || str.charAt(strindex) != (char)(b & 255)) {
return -1;
}
++strindex;
}
return strindex;
}
static int skipNullTermByteSubString(byte[] array, int index, int skipcount) {
for (int i = 0; i < skipcount; ++i) {
byte b = 1;
while (b != 0) {
b = array[index];
++index;
}
}
return index;
}
static int skipByteSubString(byte[] array, int index, int length, byte skipend) {
int result;
for (result = 0; result < length; ++result) {
byte b = array[index + result];
if (b != skipend) continue;
++result;
break;
}
return result;
}
}