package pr;

import com.google.gson.d;
import com.google.gson.u;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import or.f;
import uq.c0;
import uq.x;

/* loaded from: classes5.dex */
final class b implements f {

    /* renamed from: c, reason: collision with root package name */
    private static final x f33075c = x.c("application/json; charset=UTF-8");

    /* renamed from: d, reason: collision with root package name */
    private static final Charset f33076d = Charset.forName("UTF-8");

    /* renamed from: a, reason: collision with root package name */
    private final d f33077a;

    /* renamed from: b, reason: collision with root package name */
    private final u f33078b;

    /* JADX INFO: Access modifiers changed from: package-private */
    public b(d dVar, u uVar) {
        this.f33077a = dVar;
        this.f33078b = uVar;
    }

    @Override // or.f
    /* renamed from: a, reason: merged with bridge method [inline-methods] */
    public c0 convert(Object obj) {
        kr.d dVar = new kr.d();
        xk.c s10 = this.f33077a.s(new OutputStreamWriter(dVar.w(), f33076d));
        this.f33078b.write(s10, obj);
        s10.close();
        return c0.e(f33075c, dVar.C());
    }
}
