package o; 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; /* loaded from: classes6.dex */ public final class fRA extends TypeAdapter { private final TypeAdapter b; public fRA(TypeAdapter typeAdapter) { this.b = typeAdapter; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, T t) throws IOException { if (t == null) { jsonWriter.nullValue(); } else { this.b.write(jsonWriter, t); } } @Override // com.google.gson.TypeAdapter /* renamed from: read */ public final T read2(JsonReader jsonReader) throws IOException { if (jsonReader.peek() == JsonToken.NULL) { jsonReader.nextNull(); return null; } return this.b.read2(jsonReader); } }