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

78 lines
2.4 KiB
Java
Raw Permalink 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.Tw, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1018Tw extends TypeAdapter implements HJa {
private Gson a;
private InterfaceC15734iCu b;
private PYE c;
public C1018Tw(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.a = gson;
this.b = interfaceC15734iCu;
this.c = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
TE te = (TE) obj;
Gson gson = this.a;
PYE pye = this.c;
jsonWriter.beginObject();
String str = te.a;
pye.c(jsonWriter, 591);
String str2 = te.a;
DTh.b(gson, String.class, str2).write(jsonWriter, str2);
String str3 = te.b;
pye.c(jsonWriter, 592);
String str4 = te.b;
DTh.b(gson, String.class, str4).write(jsonWriter, str4);
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;
}
TE te = new TE();
Gson gson = this.a;
InterfaceC15734iCu interfaceC15734iCu = this.b;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 9) {
if (e != 292) {
jsonReader.skipValue();
} else if (z) {
te.a = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
te.a = null;
jsonReader.nextNull();
}
} else if (z) {
te.b = (String) gson.getAdapter(String.class).read2(jsonReader);
} else {
te.b = null;
jsonReader.nextNull();
}
}
jsonReader.endObject();
return te;
}
}