package j.r.a;

import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import j.e;
import java.io.IOException;
import okhttp3.ResponseBody;

/* JADX INFO: compiled from: GsonResponseBodyConverter.java */
/* JADX INFO: loaded from: classes.dex */
final class c<T> implements e<ResponseBody, T> {
    private final Gson a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final TypeAdapter<T> f4431b;

    c(Gson gson, TypeAdapter<T> typeAdapter) {
        this.a = gson;
        this.f4431b = typeAdapter;
    }

    @Override // j.e
    /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
    public T a(ResponseBody responseBody) throws IOException {
        try {
            return this.f4431b.read2(this.a.newJsonReader(responseBody.charStream()));
        } finally {
            responseBody.close();
        }
    }
}
