89 lines
2.5 KiB
Java
89 lines
2.5 KiB
Java
|
package o;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
import java.io.InputStream;
|
||
|
import java.io.OutputStream;
|
||
|
import java.net.Proxy;
|
||
|
import java.net.URL;
|
||
|
import java.util.LinkedList;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
import javax.net.ssl.HttpsURLConnection;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class gmU implements InterfaceC15325gna {
|
||
|
public HttpsURLConnection d;
|
||
|
|
||
|
public gmU(String str, int i, String str2, int i2) throws IOException {
|
||
|
this(null, str, i, str2, i2);
|
||
|
}
|
||
|
|
||
|
public gmU(Proxy proxy, String str, int i, String str2, int i2) throws IOException {
|
||
|
if (proxy == null) {
|
||
|
this.d = (HttpsURLConnection) new URL("https", str, i, str2).openConnection();
|
||
|
} else {
|
||
|
this.d = (HttpsURLConnection) new URL("https", str, i, str2).openConnection(proxy);
|
||
|
}
|
||
|
this.d.setConnectTimeout(i2);
|
||
|
this.d.setReadTimeout(i2);
|
||
|
this.d.setUseCaches(false);
|
||
|
this.d.setDoOutput(true);
|
||
|
this.d.setDoInput(true);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final void a() {
|
||
|
this.d.disconnect();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final List e() {
|
||
|
Map<String, List<String>> headerFields = this.d.getHeaderFields();
|
||
|
Set<String> keySet = headerFields.keySet();
|
||
|
LinkedList linkedList = new LinkedList();
|
||
|
for (String str : keySet) {
|
||
|
List<String> list = headerFields.get(str);
|
||
|
for (int i = 0; i < list.size(); i++) {
|
||
|
linkedList.add(new gmE(str, list.get(i)));
|
||
|
}
|
||
|
}
|
||
|
return linkedList;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final int c() throws IOException {
|
||
|
return this.d.getResponseCode();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public void c(String str, String str2) {
|
||
|
this.d.setRequestProperty(str, str2);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final void b(String str) throws IOException {
|
||
|
this.d.setRequestMethod(str);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final void b(int i) {
|
||
|
this.d.setFixedLengthStreamingMode(i);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final OutputStream h() throws IOException {
|
||
|
return this.d.getOutputStream();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final InputStream b() throws IOException {
|
||
|
return this.d.getInputStream();
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC15325gna
|
||
|
public final InputStream d() {
|
||
|
return this.d.getErrorStream();
|
||
|
}
|
||
|
}
|