package com.google.android.gms.internal.pal;

import androidx.annotation.Nullable;
import java.io.Closeable;
import java.net.HttpURLConnection;
import java.net.URL;

/* JADX INFO: loaded from: classes2.dex */
public final class g6 implements Closeable {

    @Nullable
    private HttpURLConnection zzc;

    @Nullable
    private e6 zzd;

    public static g6 e() {
        g6 g6Var = new g6();
        g6Var.zzd = null;
        return g6Var;
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public final void close() {
        HttpURLConnection httpURLConnection = this.zzc;
        if (httpURLConnection != null) {
            httpURLConnection.disconnect();
        }
    }

    public final HttpURLConnection g(URL url) {
        this.zzd = new e6(url);
        Integer num = 26624;
        num.intValue();
        Integer num2 = -1;
        num2.intValue();
        e6 e6Var = this.zzd;
        e6Var.getClass();
        HttpURLConnection httpURLConnection = (HttpURLConnection) e6Var.f20774a.openConnection();
        this.zzc = httpURLConnection;
        return httpURLConnection;
    }
}
