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

76 lines
2.5 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;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes.dex */
public final class NIo extends TypeAdapter implements HJa {
private InterfaceC15734iCu a;
private Gson c;
private PYE e;
public NIo(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) {
this.c = gson;
this.a = interfaceC15734iCu;
this.e = pye;
}
@Override // com.google.gson.TypeAdapter
public final void write(JsonWriter jsonWriter, Object obj) throws IOException {
if (obj == null) {
jsonWriter.nullValue();
return;
}
Gdg gdg = (Gdg) obj;
Gson gson = this.c;
PYE pye = this.e;
jsonWriter.beginObject();
pye.c(jsonWriter, 105);
Class cls = Boolean.TYPE;
Boolean valueOf = Boolean.valueOf(gdg.b);
DTh.b(gson, cls, valueOf).write(jsonWriter, valueOf);
pye.c(jsonWriter, CipherSuite.TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256);
Class cls2 = Boolean.TYPE;
Boolean valueOf2 = Boolean.valueOf(gdg.d);
DTh.b(gson, cls2, valueOf2).write(jsonWriter, valueOf2);
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;
}
Gdg gdg = new Gdg();
Gson gson = this.c;
InterfaceC15734iCu interfaceC15734iCu = this.a;
jsonReader.beginObject();
while (jsonReader.hasNext()) {
int e = interfaceC15734iCu.e(jsonReader);
boolean z = jsonReader.peek() != JsonToken.NULL;
if (e != 301) {
if (e != 614) {
jsonReader.skipValue();
} else if (z) {
gdg.b = ((Boolean) gson.getAdapter(Boolean.class).read2(jsonReader)).booleanValue();
} else {
jsonReader.nextNull();
}
} else if (z) {
gdg.d = ((Boolean) gson.getAdapter(Boolean.class).read2(jsonReader)).booleanValue();
} else {
jsonReader.nextNull();
}
}
jsonReader.endObject();
return gdg;
}
}