177 lines
5.1 KiB
Java
177 lines
5.1 KiB
Java
package b.c.a.a0.i0;
|
|
|
|
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[] j = new String[128];
|
|
public int k;
|
|
public int[] l = new int[32];
|
|
public String[] m = new String[32];
|
|
public int[] n = new int[32];
|
|
|
|
/* compiled from: JsonReader */
|
|
public static final class a {
|
|
public final String[] a;
|
|
|
|
/* renamed from: b reason: collision with root package name */
|
|
public final o f328b;
|
|
|
|
public a(String[] strArr, o oVar) {
|
|
this.a = strArr;
|
|
this.f328b = 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.j;
|
|
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.k.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 i = 0; i <= 31; i++) {
|
|
j[i] = String.format("\\u%04x", Integer.valueOf(i));
|
|
}
|
|
String[] strArr = j;
|
|
strArr[34] = "\\\"";
|
|
strArr[92] = "\\\\";
|
|
strArr[9] = "\\t";
|
|
strArr[8] = "\\b";
|
|
strArr[10] = "\\n";
|
|
strArr[13] = "\\r";
|
|
strArr[12] = "\\f";
|
|
}
|
|
|
|
public abstract void A() throws IOException;
|
|
|
|
public abstract void C() throws IOException;
|
|
|
|
public final b D(String str) throws b {
|
|
StringBuilder V = b.d.b.a.a.V(str, " at path ");
|
|
V.append(getPath());
|
|
throw new b(V.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 i = this.k;
|
|
int[] iArr = this.l;
|
|
String[] strArr = this.m;
|
|
int[] iArr2 = this.n;
|
|
StringBuilder O = b.d.b.a.a.O('$');
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
int i3 = iArr[i2];
|
|
if (i3 == 1 || i3 == 2) {
|
|
O.append('[');
|
|
O.append(iArr2[i2]);
|
|
O.append(']');
|
|
} else if (i3 == 3 || i3 == 4 || i3 == 5) {
|
|
O.append('.');
|
|
if (strArr[i2] != null) {
|
|
O.append(strArr[i2]);
|
|
}
|
|
}
|
|
}
|
|
return O.toString();
|
|
}
|
|
|
|
public abstract double n() throws IOException;
|
|
|
|
public abstract int q() throws IOException;
|
|
|
|
public abstract String s() throws IOException;
|
|
|
|
public abstract String t() throws IOException;
|
|
|
|
public abstract b u() throws IOException;
|
|
|
|
public final void x(int i) {
|
|
int i2 = this.k;
|
|
int[] iArr = this.l;
|
|
if (i2 == iArr.length) {
|
|
if (i2 != 256) {
|
|
this.l = Arrays.copyOf(iArr, iArr.length * 2);
|
|
String[] strArr = this.m;
|
|
this.m = (String[]) Arrays.copyOf(strArr, strArr.length * 2);
|
|
int[] iArr2 = this.n;
|
|
this.n = Arrays.copyOf(iArr2, iArr2.length * 2);
|
|
} else {
|
|
StringBuilder R = b.d.b.a.a.R("Nesting too deep at ");
|
|
R.append(getPath());
|
|
throw new a(R.toString());
|
|
}
|
|
}
|
|
int[] iArr3 = this.l;
|
|
int i3 = this.k;
|
|
this.k = i3 + 1;
|
|
iArr3[i3] = i;
|
|
}
|
|
|
|
public abstract int y(a aVar) throws IOException;
|
|
}
|