what-the-bank/sources/o/C0152Ahz.java

78 lines
2.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
/* renamed from: o.Ahz, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0152Ahz extends TypeAdapter implements HJa {
private PYE a;
private InterfaceC15734iCu b;
private Gson d;
public C0152Ahz(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.d = gson;
this.b = interfaceC15734iCu;
this.a = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
Hvk hvk = (Hvk) obj;
Gson gson = this.d;
PYE pye = this.a;
jsonWriter.beginObject();
if (hvk != hvk.a) {
pye.c(jsonWriter, 549);
String str = hvk.a;
DTh.b(gson, String.class, str).write(jsonWriter, str);
}
pye.c(jsonWriter, 136);
Class cls = Integer.TYPE;
Integer valueOf = Integer.valueOf(hvk.b);
DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf);
jsonWriter.endObject();
}
@Override // com.google.gson.TypeAdapter
/* renamed from: read */
public final Object read2(JsonReader jsonReader) throws IOException {
if (jsonReader.peek() == JsonToken.NULL) {
jsonReader.skipValue();
return null;
}
Hvk hvk = new Hvk();
Gson gson = this.d;
InterfaceC15734iCu interfaceC15734iCu = this.b;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 187) {
if (e != 631) {
jsonReader.skipValue();
} else if (z) {
hvk.b = ((Integer) gson.getAdapter(Integer.class).read2(jsonReader)).intValue();
} else {
jsonReader.nextNull();
}
} else if (z) {
hvk.a = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
hvk.a = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return hvk;
}
}