正在查看: CallApp v2.226 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package pq;
import com.squareup.okhttp.a0;
import com.squareup.okhttp.c0;
import com.squareup.okhttp.internal.http.RequestException;
import com.squareup.okhttp.internal.http.RouteException;
import com.squareup.okhttp.n;
import com.squareup.okhttp.p;
import com.squareup.okhttp.t;
import com.squareup.okhttp.u;
import com.squareup.okhttp.x;
import com.twilio.voice.VoiceURLConnection;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.ProtocolException;
import java.net.Proxy;
import java.net.SocketPermission;
import java.net.URL;
import java.security.Permission;
import java.security.cert.CertificateException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLPeerUnverifiedException;
import lx.h0;
import mq.f;
import mq.k;
import oq.h;
import oq.i;
import oq.m;
import oq.q;
import oq.r;
import oq.s;
import py.d0;
import py.w;
public class b extends HttpURLConnection {
public static final LinkedHashSet j = new LinkedHashSet(Arrays.asList("OPTIONS", "GET", "HEAD", VoiceURLConnection.METHOD_TYPE_POST, "PUT", VoiceURLConnection.METHOD_TYPE_DELETE, "TRACE", "PATCH"));
public static final x k;
public final t a;
public p.a b;
public long c;
public int d;
public IOException e;
public i f;
public p g;
public c0 h;
public n i;
static {
long j2 = 0;
mq.n.a(j2, j2, j2);
k = new x(null, 0, new byte[0], 0);
}
public b(URL url, t tVar) {
super(url);
this.b = new p.a();
this.c = -1L;
this.a = tVar;
}
public final boolean a(boolean z) {
boolean z2 = true;
i iVar = null;
try {
this.f.h();
i iVar2 = this.f;
this.h = iVar2.e;
com.squareup.okhttp.i iVar3 = iVar2.b;
this.i = iVar3 != null ? iVar3.i : null;
if (!z) {
return true;
}
iVar2.f();
return true;
} catch (RequestException e) {
IOException a = e.a();
this.e = a;
throw a;
} catch (RouteException e2) {
i iVar4 = this.f;
q qVar = iVar4.d;
if (qVar != null && iVar4.b != null) {
iVar4.b(qVar, e2.a);
}
q qVar2 = iVar4.d;
if ((qVar2 != null || iVar4.b != null) && ((qVar2 == null || qVar2.i < qVar2.h.size() || qVar2.g < qVar2.f.size() || !qVar2.j.isEmpty()) && iVar4.a.q)) {
IOException iOException = e2.a;
if (!(iOException instanceof ProtocolException) && !(iOException instanceof InterruptedIOException) && ((!(iOException instanceof SSLHandshakeException) || !(iOException.getCause() instanceof CertificateException)) && !(iOException instanceof SSLPeerUnverifiedException))) {
iVar = new i(iVar4.a, iVar4.k, iVar4.j, iVar4.q, iVar4.r, iVar4.a(), iVar4.d, (oq.p) iVar4.o, iVar4.f);
}
}
if (iVar != null) {
this.f = iVar;
return false;
}
IOException iOException2 = e2.a;
this.e = iOException2;
throw iOException2;
} catch (IOException e3) {
i iVar5 = this.f;
d0 d0Var = iVar5.o;
q qVar3 = iVar5.d;
if (qVar3 != null && iVar5.b != null) {
iVar5.b(qVar3, e3);
}
if (d0Var != null && !(d0Var instanceof oq.p)) {
z2 = false;
}
q qVar4 = iVar5.d;
if ((qVar4 != null || iVar5.b != null) && ((qVar4 == null || qVar4.i < qVar4.h.size() || qVar4.g < qVar4.f.size() || !qVar4.j.isEmpty()) && iVar5.a.q && !(e3 instanceof ProtocolException) && !(e3 instanceof InterruptedIOException) && z2)) {
iVar = new i(iVar5.a, iVar5.k, iVar5.j, iVar5.q, iVar5.r, iVar5.a(), iVar5.d, (oq.p) d0Var, iVar5.f);
}
if (iVar != null) {
this.f = iVar;
return false;
}
this.e = e3;
throw e3;
}
}
@Override
public final void addRequestProperty(String str, String str2) {
if (((HttpURLConnection) this).connected) {
throw new IllegalStateException("Cannot add request property after connection is made");
}
if (str == null) {
throw new NullPointerException("field == null");
}
if (str2 != null) {
if ("X-Android-Transports".equals(str) || "X-Android-Protocols".equals(str)) {
f(str2, true);
return;
} else {
this.b.a(str, str2);
return;
}
}
k.a.getClass();
System.out.println("Ignoring header " + str + " because its value was null.");
}
public final p b() {
String str;
if (this.g == null) {
a0 c = c().c();
p.a c2 = c.f.c();
k.a.getClass();
a0 a0Var = c.h;
a0 a0Var2 = c.i;
int i = c.c;
if (a0Var == null) {
str = a0Var2 == null ? "NONE" : a1.d0.j(i, "CACHE ");
} else if (a0Var2 == null) {
str = a1.d0.j(i, "NETWORK ");
} else {
str = "CONDITIONAL_CACHE " + a0Var.c;
}
c2.a("OkHttp-Response-Source", str);
this.g = c2.d();
}
return this.g;
}
public final oq.i c() {
throw new UnsupportedOperationException("Method not decompiled: pq.b.c():oq.i");
}
@Override
public final void connect() {
d();
while (!a(false)) {
}
}
public final void d() {
IOException iOException = this.e;
if (iOException != null) {
throw iOException;
}
if (this.f != null) {
return;
}
((HttpURLConnection) this).connected = true;
try {
if (((HttpURLConnection) this).doOutput) {
if (((HttpURLConnection) this).method.equals("GET")) {
((HttpURLConnection) this).method = VoiceURLConnection.METHOD_TYPE_POST;
} else if (!oq.k.b(((HttpURLConnection) this).method)) {
throw new ProtocolException(((HttpURLConnection) this).method + " does not support writing");
}
}
this.f = e(((HttpURLConnection) this).method, null, null, null);
} catch (IOException e) {
this.e = e;
throw e;
}
}
@Override
public final void disconnect() {
i iVar = this.f;
if (iVar == null) {
return;
}
try {
s sVar = iVar.g;
if (sVar != null) {
sVar.a(iVar);
return;
}
com.squareup.okhttp.i iVar2 = iVar.b;
if (iVar2 != null) {
f.b.a(iVar2, iVar);
}
} catch (IOException unused) {
}
}
public final oq.i e(java.lang.String r19, com.squareup.okhttp.i r20, oq.p r21, com.squareup.okhttp.a0 r22) {
throw new UnsupportedOperationException("Method not decompiled: pq.b.e(java.lang.String, com.squareup.okhttp.i, oq.p, com.squareup.okhttp.a0):oq.i");
}
public final void f(String str, boolean z) {
ArrayList arrayList = new ArrayList();
t tVar = this.a;
if (z) {
arrayList.addAll(tVar.c);
}
for (String str2 : str.split(",", -1)) {
try {
arrayList.add(u.get(str2));
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
tVar.b(arrayList);
}
@Override
public final int getConnectTimeout() {
return this.a.r;
}
@Override
public final InputStream getErrorStream() {
try {
i c = c();
if (!i.d(c.c()) || c.c().c < 400) {
return null;
}
return c.c().g.q().B0();
} catch (IOException unused) {
return null;
}
}
@Override
public final String getHeaderField(int i) {
try {
return b().e(i);
} catch (IOException unused) {
return null;
}
}
@Override
public final String getHeaderFieldKey(int i) {
try {
return b().b(i);
} catch (IOException unused) {
return null;
}
}
@Override
public final Map getHeaderFields() {
try {
p b = b();
a0 c = c().c();
return m.c(b, new r(c.b, c.c, c.d).toString());
} catch (IOException unused) {
return Collections.EMPTY_MAP;
}
}
@Override
public final InputStream getInputStream() {
if (!((HttpURLConnection) this).doInput) {
throw new ProtocolException("This protocol does not support input");
}
i c = c();
if (getResponseCode() < 400) {
return c.c().g.q().B0();
}
throw new FileNotFoundException(((HttpURLConnection) this).url.toString());
}
@Override
public final OutputStream getOutputStream() {
connect();
i iVar = this.f;
py.x xVar = iVar.p;
if (xVar == null) {
if (iVar.t == null) {
throw new IllegalStateException();
}
d0 d0Var = iVar.o;
if (d0Var != null) {
xVar = h0.p(d0Var);
iVar.p = xVar;
} else {
xVar = null;
}
}
if (xVar != null) {
if (this.f.n == null) {
return new w(xVar);
}
throw new ProtocolException("cannot write request body after response has been read");
}
throw new ProtocolException("method does not support a request body: " + ((HttpURLConnection) this).method);
}
@Override
public final Permission getPermission() {
URL url = getURL();
String host = url.getHost();
int port = url.getPort() != -1 ? url.getPort() : com.squareup.okhttp.r.c(url.getProtocol());
if (usingProxy()) {
InetSocketAddress inetSocketAddress = (InetSocketAddress) this.a.b.address();
host = inetSocketAddress.getHostName();
port = inetSocketAddress.getPort();
}
return new SocketPermission(host + ":" + port, "connect, resolve");
}
@Override
public final int getReadTimeout() {
return this.a.s;
}
@Override
public final Map getRequestProperties() {
if (((HttpURLConnection) this).connected) {
throw new IllegalStateException("Cannot access request header fields after connection is set");
}
return m.c(this.b.d(), null);
}
@Override
public final String getRequestProperty(String str) {
if (str == null) {
return null;
}
ArrayList arrayList = this.b.a;
for (int size = arrayList.size() - 2; size >= 0; size -= 2) {
if (str.equalsIgnoreCase((String) arrayList.get(size))) {
return (String) arrayList.get(size + 1);
}
}
return null;
}
@Override
public final int getResponseCode() {
return c().c().c;
}
@Override
public final String getResponseMessage() {
return c().c().d;
}
@Override
public final void setConnectTimeout(int i) {
long j2 = i;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
t tVar = this.a;
tVar.getClass();
if (j2 < 0) {
throw new IllegalArgumentException("timeout < 0");
}
if (timeUnit == null) {
throw new IllegalArgumentException("unit == null");
}
long millis = timeUnit.toMillis(j2);
if (millis > 2147483647L) {
throw new IllegalArgumentException("Timeout too large.");
}
if (millis == 0 && j2 > 0) {
throw new IllegalArgumentException("Timeout too small.");
}
tVar.r = (int) millis;
}
@Override
public final void setFixedLengthStreamingMode(int i) {
setFixedLengthStreamingMode(i);
}
@Override
public final void setIfModifiedSince(long j2) {
super.setIfModifiedSince(j2);
if (((HttpURLConnection) this).ifModifiedSince == 0) {
this.b.f("If-Modified-Since");
return;
}
this.b.g("If-Modified-Since", ((DateFormat) h.b.get()).format(new Date(((HttpURLConnection) this).ifModifiedSince)));
}
@Override
public final void setInstanceFollowRedirects(boolean z) {
this.a.p = z;
}
@Override
public final void setReadTimeout(int i) {
long j2 = i;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
t tVar = this.a;
tVar.getClass();
if (j2 < 0) {
throw new IllegalArgumentException("timeout < 0");
}
if (timeUnit == null) {
throw new IllegalArgumentException("unit == null");
}
long millis = timeUnit.toMillis(j2);
if (millis > 2147483647L) {
throw new IllegalArgumentException("Timeout too large.");
}
if (millis == 0 && j2 > 0) {
throw new IllegalArgumentException("Timeout too small.");
}
tVar.s = (int) millis;
}
@Override
public final void setRequestMethod(String str) {
LinkedHashSet linkedHashSet = j;
if (linkedHashSet.contains(str)) {
((HttpURLConnection) this).method = str;
return;
}
throw new ProtocolException("Expected one of " + linkedHashSet + " but was " + str);
}
@Override
public final void setRequestProperty(String str, String str2) {
if (((HttpURLConnection) this).connected) {
throw new IllegalStateException("Cannot set request property after connection is made");
}
if (str == null) {
throw new NullPointerException("field == null");
}
if (str2 != null) {
if ("X-Android-Transports".equals(str) || "X-Android-Protocols".equals(str)) {
f(str2, false);
return;
} else {
this.b.g(str, str2);
return;
}
}
k.a.getClass();
System.out.println("Ignoring header " + str + " because its value was null.");
}
@Override
public final boolean usingProxy() {
c0 c0Var = this.h;
Proxy proxy = c0Var != null ? c0Var.b : this.a.b;
return (proxy == null || proxy.type() == Proxy.Type.DIRECT) ? false : true;
}
@Override
public final String getHeaderField(String str) {
try {
if (str != null) {
return b().a(str);
}
a0 c = c().c();
return new r(c.b, c.c, c.d).toString();
} catch (IOException unused) {
return null;
}
}
@Override
public final void setFixedLengthStreamingMode(long j2) {
if (((HttpURLConnection) this).connected) {
throw new IllegalStateException("Already connected");
}
if (((HttpURLConnection) this).chunkLength > 0) {
throw new IllegalStateException("Already in chunked mode");
}
if (j2 < 0) {
throw new IllegalArgumentException("contentLength < 0");
}
this.c = j2;
((HttpURLConnection) this).fixedContentLength = (int) Math.min(j2, 2147483647L);
}
}