what-the-bank/sources/okhttp3/repackaged/internal/huc/a.java

353 lines
10 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3.repackaged.internal.huc;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;
import java.security.Permission;
import java.security.Principal;
import java.security.cert.Certificate;
import java.util.List;
import java.util.Map;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSocketFactory;
import okhttp3.repackaged.Handshake;
/* loaded from: classes6.dex */
abstract class a extends HttpsURLConnection {
private final HttpURLConnection amI;
@Override // javax.net.ssl.HttpsURLConnection
public abstract HostnameVerifier getHostnameVerifier();
@Override // javax.net.ssl.HttpsURLConnection
public abstract SSLSocketFactory getSSLSocketFactory();
protected abstract Handshake handshake();
@Override // javax.net.ssl.HttpsURLConnection
public abstract void setHostnameVerifier(HostnameVerifier hostnameVerifier);
@Override // javax.net.ssl.HttpsURLConnection
public abstract void setSSLSocketFactory(SSLSocketFactory sSLSocketFactory);
public a(HttpURLConnection httpURLConnection) {
super(httpURLConnection.getURL());
this.amI = httpURLConnection;
}
@Override // javax.net.ssl.HttpsURLConnection
public String getCipherSuite() {
Handshake handshake = handshake();
if (handshake != null) {
return handshake.cipherSuite().javaName();
}
return null;
}
@Override // javax.net.ssl.HttpsURLConnection
public Certificate[] getLocalCertificates() {
Handshake handshake = handshake();
if (handshake == null) {
return null;
}
List<Certificate> localCertificates = handshake.localCertificates();
if (localCertificates.isEmpty()) {
return null;
}
return (Certificate[]) localCertificates.toArray(new Certificate[localCertificates.size()]);
}
@Override // javax.net.ssl.HttpsURLConnection
public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException {
Handshake handshake = handshake();
if (handshake == null) {
return null;
}
List<Certificate> peerCertificates = handshake.peerCertificates();
if (peerCertificates.isEmpty()) {
return null;
}
return (Certificate[]) peerCertificates.toArray(new Certificate[peerCertificates.size()]);
}
@Override // javax.net.ssl.HttpsURLConnection
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
Handshake handshake = handshake();
if (handshake != null) {
return handshake.peerPrincipal();
}
return null;
}
@Override // javax.net.ssl.HttpsURLConnection
public Principal getLocalPrincipal() {
Handshake handshake = handshake();
if (handshake != null) {
return handshake.localPrincipal();
}
return null;
}
@Override // java.net.URLConnection
public void connect() throws IOException {
((URLConnection) this).connected = true;
this.amI.connect();
}
@Override // java.net.HttpURLConnection
public void disconnect() {
this.amI.disconnect();
}
@Override // java.net.HttpURLConnection
public InputStream getErrorStream() {
return this.amI.getErrorStream();
}
@Override // java.net.HttpURLConnection
public String getRequestMethod() {
return this.amI.getRequestMethod();
}
@Override // java.net.HttpURLConnection
public int getResponseCode() throws IOException {
return this.amI.getResponseCode();
}
@Override // java.net.HttpURLConnection
public String getResponseMessage() throws IOException {
return this.amI.getResponseMessage();
}
@Override // java.net.HttpURLConnection
public void setRequestMethod(String str) throws ProtocolException {
this.amI.setRequestMethod(str);
}
@Override // java.net.HttpURLConnection
public boolean usingProxy() {
return this.amI.usingProxy();
}
@Override // java.net.HttpURLConnection
public boolean getInstanceFollowRedirects() {
return this.amI.getInstanceFollowRedirects();
}
@Override // java.net.HttpURLConnection
public void setInstanceFollowRedirects(boolean z) {
this.amI.setInstanceFollowRedirects(z);
}
@Override // java.net.URLConnection
public boolean getAllowUserInteraction() {
return this.amI.getAllowUserInteraction();
}
@Override // java.net.URLConnection
public Object getContent() throws IOException {
return this.amI.getContent();
}
@Override // java.net.URLConnection
public Object getContent(Class[] clsArr) throws IOException {
return this.amI.getContent(clsArr);
}
@Override // java.net.URLConnection
public String getContentEncoding() {
return this.amI.getContentEncoding();
}
@Override // java.net.URLConnection
public int getContentLength() {
return this.amI.getContentLength();
}
@Override // java.net.URLConnection
public String getContentType() {
return this.amI.getContentType();
}
@Override // java.net.URLConnection
public long getDate() {
return this.amI.getDate();
}
@Override // java.net.URLConnection
public boolean getDefaultUseCaches() {
return this.amI.getDefaultUseCaches();
}
@Override // java.net.URLConnection
public boolean getDoInput() {
return this.amI.getDoInput();
}
@Override // java.net.URLConnection
public boolean getDoOutput() {
return this.amI.getDoOutput();
}
@Override // java.net.URLConnection
public long getExpiration() {
return this.amI.getExpiration();
}
@Override // java.net.HttpURLConnection, java.net.URLConnection
public String getHeaderField(int i) {
return this.amI.getHeaderField(i);
}
@Override // java.net.URLConnection
public Map<String, List<String>> getHeaderFields() {
return this.amI.getHeaderFields();
}
@Override // java.net.URLConnection
public Map<String, List<String>> getRequestProperties() {
return this.amI.getRequestProperties();
}
@Override // java.net.URLConnection
public void addRequestProperty(String str, String str2) {
this.amI.addRequestProperty(str, str2);
}
@Override // java.net.URLConnection
public String getHeaderField(String str) {
return this.amI.getHeaderField(str);
}
@Override // java.net.HttpURLConnection, java.net.URLConnection
public long getHeaderFieldDate(String str, long j) {
return this.amI.getHeaderFieldDate(str, j);
}
@Override // java.net.URLConnection
public int getHeaderFieldInt(String str, int i) {
return this.amI.getHeaderFieldInt(str, i);
}
@Override // java.net.HttpURLConnection, java.net.URLConnection
public String getHeaderFieldKey(int i) {
return this.amI.getHeaderFieldKey(i);
}
@Override // java.net.URLConnection
public long getIfModifiedSince() {
return this.amI.getIfModifiedSince();
}
@Override // java.net.URLConnection
public InputStream getInputStream() throws IOException {
return this.amI.getInputStream();
}
@Override // java.net.URLConnection
public long getLastModified() {
return this.amI.getLastModified();
}
@Override // java.net.URLConnection
public OutputStream getOutputStream() throws IOException {
return this.amI.getOutputStream();
}
@Override // java.net.HttpURLConnection, java.net.URLConnection
public Permission getPermission() throws IOException {
return this.amI.getPermission();
}
@Override // java.net.URLConnection
public String getRequestProperty(String str) {
return this.amI.getRequestProperty(str);
}
@Override // java.net.URLConnection
public URL getURL() {
return this.amI.getURL();
}
@Override // java.net.URLConnection
public boolean getUseCaches() {
return this.amI.getUseCaches();
}
@Override // java.net.URLConnection
public void setAllowUserInteraction(boolean z) {
this.amI.setAllowUserInteraction(z);
}
@Override // java.net.URLConnection
public void setDefaultUseCaches(boolean z) {
this.amI.setDefaultUseCaches(z);
}
@Override // java.net.URLConnection
public void setDoInput(boolean z) {
this.amI.setDoInput(z);
}
@Override // java.net.URLConnection
public void setDoOutput(boolean z) {
this.amI.setDoOutput(z);
}
@Override // java.net.URLConnection
public void setIfModifiedSince(long j) {
this.amI.setIfModifiedSince(j);
}
@Override // java.net.URLConnection
public void setRequestProperty(String str, String str2) {
this.amI.setRequestProperty(str, str2);
}
@Override // java.net.URLConnection
public void setUseCaches(boolean z) {
this.amI.setUseCaches(z);
}
@Override // java.net.URLConnection
public void setConnectTimeout(int i) {
this.amI.setConnectTimeout(i);
}
@Override // java.net.URLConnection
public int getConnectTimeout() {
return this.amI.getConnectTimeout();
}
@Override // java.net.URLConnection
public void setReadTimeout(int i) {
this.amI.setReadTimeout(i);
}
@Override // java.net.URLConnection
public int getReadTimeout() {
return this.amI.getReadTimeout();
}
@Override // java.net.URLConnection
public String toString() {
return this.amI.toString();
}
@Override // java.net.HttpURLConnection
public void setFixedLengthStreamingMode(int i) {
this.amI.setFixedLengthStreamingMode(i);
}
@Override // java.net.HttpURLConnection
public void setChunkedStreamingMode(int i) {
this.amI.setChunkedStreamingMode(i);
}
}