175 lines
5.0 KiB
Java
175 lines
5.0 KiB
Java
package c.c.a.a0.h0;
|
|
|
|
import g0.e;
|
|
import g0.o;
|
|
import java.io.Closeable;
|
|
import java.io.IOException;
|
|
import java.util.Arrays;
|
|
import okio.ByteString;
|
|
/* compiled from: JsonReader */
|
|
public abstract class c implements Closeable {
|
|
public static final String[] i = new String[128];
|
|
public int j;
|
|
public int[] k = new int[32];
|
|
public String[] l = new String[32];
|
|
public int[] m = new int[32];
|
|
|
|
/* compiled from: JsonReader */
|
|
public static final class a {
|
|
public final String[] a;
|
|
public final o b;
|
|
|
|
public a(String[] strArr, o oVar) {
|
|
this.a = strArr;
|
|
this.b = oVar;
|
|
}
|
|
|
|
public static a a(String... strArr) {
|
|
String str;
|
|
try {
|
|
ByteString[] byteStringArr = new ByteString[strArr.length];
|
|
e eVar = new e();
|
|
for (int i = 0; i < strArr.length; i++) {
|
|
String str2 = strArr[i];
|
|
String[] strArr2 = c.i;
|
|
eVar.T(34);
|
|
int length = str2.length();
|
|
int i2 = 0;
|
|
for (int i3 = 0; i3 < length; i3++) {
|
|
char charAt = str2.charAt(i3);
|
|
if (charAt < 128) {
|
|
str = strArr2[charAt];
|
|
if (str == null) {
|
|
}
|
|
} else if (charAt == 8232) {
|
|
str = "\\u2028";
|
|
} else if (charAt == 8233) {
|
|
str = "\\u2029";
|
|
}
|
|
if (i2 < i3) {
|
|
eVar.c0(str2, i2, i3);
|
|
}
|
|
eVar.b0(str);
|
|
i2 = i3 + 1;
|
|
}
|
|
if (i2 < length) {
|
|
eVar.c0(str2, i2, length);
|
|
}
|
|
eVar.T(34);
|
|
eVar.readByte();
|
|
byteStringArr[i] = eVar.x();
|
|
}
|
|
return new a((String[]) strArr.clone(), o.j.c(byteStringArr));
|
|
} catch (IOException e) {
|
|
throw new AssertionError(e);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* compiled from: JsonReader */
|
|
public enum b {
|
|
BEGIN_ARRAY,
|
|
END_ARRAY,
|
|
BEGIN_OBJECT,
|
|
END_OBJECT,
|
|
NAME,
|
|
STRING,
|
|
NUMBER,
|
|
BOOLEAN,
|
|
NULL,
|
|
END_DOCUMENT
|
|
}
|
|
|
|
static {
|
|
for (int i2 = 0; i2 <= 31; i2++) {
|
|
i[i2] = String.format("\\u%04x", Integer.valueOf(i2));
|
|
}
|
|
String[] strArr = i;
|
|
strArr[34] = "\\\"";
|
|
strArr[92] = "\\\\";
|
|
strArr[9] = "\\t";
|
|
strArr[8] = "\\b";
|
|
strArr[10] = "\\n";
|
|
strArr[13] = "\\r";
|
|
strArr[12] = "\\f";
|
|
}
|
|
|
|
public abstract void B() throws IOException;
|
|
|
|
public abstract void C() throws IOException;
|
|
|
|
public final b G(String str) throws b {
|
|
StringBuilder O = c.d.b.a.a.O(str, " at path ");
|
|
O.append(getPath());
|
|
throw new b(O.toString());
|
|
}
|
|
|
|
public abstract void a() throws IOException;
|
|
|
|
public abstract void b() throws IOException;
|
|
|
|
public abstract void c() throws IOException;
|
|
|
|
public abstract void d() throws IOException;
|
|
|
|
public abstract boolean e() throws IOException;
|
|
|
|
public abstract boolean f() throws IOException;
|
|
|
|
public final String getPath() {
|
|
int i2 = this.j;
|
|
int[] iArr = this.k;
|
|
String[] strArr = this.l;
|
|
int[] iArr2 = this.m;
|
|
StringBuilder H = c.d.b.a.a.H('$');
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
int i4 = iArr[i3];
|
|
if (i4 == 1 || i4 == 2) {
|
|
H.append('[');
|
|
H.append(iArr2[i3]);
|
|
H.append(']');
|
|
} else if (i4 == 3 || i4 == 4 || i4 == 5) {
|
|
H.append('.');
|
|
if (strArr[i3] != null) {
|
|
H.append(strArr[i3]);
|
|
}
|
|
}
|
|
}
|
|
return H.toString();
|
|
}
|
|
|
|
public abstract double p() throws IOException;
|
|
|
|
public abstract int r() throws IOException;
|
|
|
|
public abstract String s() throws IOException;
|
|
|
|
public abstract String t() throws IOException;
|
|
|
|
public abstract b w() throws IOException;
|
|
|
|
public final void x(int i2) {
|
|
int i3 = this.j;
|
|
int[] iArr = this.k;
|
|
if (i3 == iArr.length) {
|
|
if (i3 != 256) {
|
|
this.k = Arrays.copyOf(iArr, iArr.length * 2);
|
|
String[] strArr = this.l;
|
|
this.l = (String[]) Arrays.copyOf(strArr, strArr.length * 2);
|
|
int[] iArr2 = this.m;
|
|
this.m = Arrays.copyOf(iArr2, iArr2.length * 2);
|
|
} else {
|
|
StringBuilder K = c.d.b.a.a.K("Nesting too deep at ");
|
|
K.append(getPath());
|
|
throw new a(K.toString());
|
|
}
|
|
}
|
|
int[] iArr3 = this.k;
|
|
int i4 = this.j;
|
|
this.j = i4 + 1;
|
|
iArr3[i4] = i2;
|
|
}
|
|
|
|
public abstract int z(a aVar) throws IOException;
|
|
}
|