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 Dlm extends TypeAdapter implements HJa { private Gson b; private InterfaceC15734iCu d; private PYE e; public Dlm(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.b = gson; this.d = 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; } Gson gson = this.b; PYE pye = this.e; jsonWriter.beginObject(); pye.c(jsonWriter, CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA256); Class cls = Long.TYPE; Long valueOf = Long.valueOf(((fTZ) obj).a); 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; } fTZ ftz = new fTZ(); Gson gson = this.b; InterfaceC15734iCu interfaceC15734iCu = this.d; jsonReader.beginObject(); while (jsonReader.hasNext()) { int e = interfaceC15734iCu.e(jsonReader); boolean z = jsonReader.peek() != JsonToken.NULL; if (e != 546) { jsonReader.skipValue(); } else if (z) { ftz.a = ((Long) gson.getAdapter(Long.class).read2(jsonReader)).longValue(); } else { jsonReader.nextNull(); } } jsonReader.endObject(); return ftz; } }