正在查看: Tasker v6.5.11 应用的 u.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 u.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package dg;
import android.net.Uri;
import com.joaomgcd.taskerm.util.p1;
import com.joaomgcd.taskerm.util.s6;
import com.joaomgcd.taskerm.util.x2;
import com.joaomgcd.taskerm.util.y5;
import com.joaomgcd.taskerm.util.z2;
import dg.s;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Map;
import net.dinglisch.android.taskerm.dq;
public final class u<TResult, TResultError extends p1> extends t<h<TResult, TResultError>, TResult, TResultError> implements s {
private final s6 d;
static final class a extends yj.q implements xj.a<Uri> {
final String i;
a(String str) {
super(0);
this.i = str;
}
@Override
public final Uri invoke() {
return z2.n("http://test.com?" + this.i);
}
}
public u(h<TResult, TResultError> hVar) {
super(hVar);
yj.p.i(hVar, "args");
this.d = hVar.z().f();
}
private final long l(OutputStream outputStream, String str, String str2) {
long C = o0.C(outputStream, "Content-Disposition: form-data; name=\"" + str + "\"");
if (str2 != null) {
C += o0.C(outputStream, "; filename=\"" + str2 + "\"");
}
return C + o0.G(outputStream);
}
static long m(u uVar, OutputStream outputStream, String str, String str2, int i, Object obj) {
if ((i & 2) != 0) {
str2 = null;
}
return uVar.l(outputStream, str, str2);
}
private final long n(OutputStream outputStream, String str) {
yj.i0 i0Var = new yj.i0();
if (str != null) {
return p(i0Var, outputStream, str);
}
if (!(((h) f()).z() instanceof j0)) {
return i0Var.i;
}
String H0 = dq.H0(((j0) ((h) f()).z()).h());
return (H0 == null || H0.length() == 0) ? i0Var.i : p(i0Var, outputStream, H0);
}
static long o(u uVar, OutputStream outputStream, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
return uVar.n(outputStream, str);
}
private static final long p(yj.i0 i0Var, OutputStream outputStream, String str) {
long C = i0Var.i + o0.C(outputStream, "Content-Type: " + str);
i0Var.i = C;
long G = C + o0.G(outputStream);
i0Var.i = G;
return G;
}
private final long r(OutputStream outputStream, String str, long j, boolean z) {
long E;
long D;
String str2;
h0 z2 = ((h) f()).z();
String b = z2.b();
if (b == null || b.length() == 0) {
long F = j + o0.F(outputStream);
HashMap<String, String> e = ((h) f()).e();
E = F + o0.E(outputStream, str, e != null ? e.get(o0.q()) : null) + o0.F(outputStream) + v(outputStream, z);
D = o0.D(outputStream);
} else {
long s = j + s(outputStream, str);
if (z2 instanceof j0) {
str2 = ((j0) z2).h().getName();
yj.p.h(str2, "getName(...)");
} else {
str2 = b;
}
E = s + u(outputStream, b, str2, z) + o0.D(outputStream);
D = o0.G(outputStream);
}
return E + D;
}
private final long s(OutputStream outputStream, String str) {
yj.i0 i0Var = new yj.i0();
HashMap<String, String> j2 = x2.j2((Uri) x2.U4(null, new a(str), 1, null));
if (j2.size() > 0) {
for (Map.Entry<String, String> entry : j2.entrySet()) {
t(i0Var, outputStream, this, entry.getKey(), entry.getValue());
}
} else {
t(i0Var, outputStream, this, "body", str);
}
long G = i0Var.i + o0.G(outputStream);
i0Var.i = G;
return G;
}
private static final <TResult, TResultError extends p1> void t(yj.i0 i0Var, OutputStream outputStream, u<TResult, TResultError> uVar, String str, String str2) {
long j = i0Var.i;
if (j > 0) {
i0Var.i = j + o0.G(outputStream);
}
long F = i0Var.i + o0.F(outputStream);
i0Var.i = F;
long m = F + m(uVar, outputStream, str, null, 2, null);
i0Var.i = m;
long n = m + uVar.n(outputStream, "text/plain");
i0Var.i = n;
long G = n + o0.G(outputStream);
i0Var.i = G;
i0Var.i = G + o0.C(outputStream, str2);
}
private final long u(OutputStream outputStream, String str, String str2, boolean z) throws IOException {
return o0.F(outputStream) + l(outputStream, str, str2) + o(this, outputStream, null, 1, null) + o0.C(outputStream, "Content-Transfer-Encoding: binary") + o0.G(outputStream) + o0.G(outputStream) + q(outputStream, ((h) f()).z().d(), ((h) f()).z().e(), ((h) f()).h(), z);
}
private final long v(OutputStream outputStream, boolean z) throws IOException {
return o0.C(outputStream, "Content-Type: application/octet-stream") + o0.G(outputStream) + o0.G(outputStream) + q(outputStream, ((h) f()).z().d(), ((h) f()).z().e(), ((h) f()).h(), z);
}
@Override
protected s6 h() {
return this.d;
}
@Override
public Long i() {
Long e = ((h) f()).z().e();
if (e != null) {
return Long.valueOf(e.longValue() + ((h) f()).y().length());
}
return null;
}
@Override
protected long k(HttpURLConnection httpURLConnection, boolean z) throws IOException {
yj.p.i(httpURLConnection, "<this>");
OutputStream outputStream = null;
try {
String y = ((h) f()).y();
o0.c(httpURLConnection, ((h) f()).z().b());
outputStream = j(httpURLConnection, z);
return r(outputStream, y, 0L, z);
} finally {
if (outputStream != null) {
outputStream.close();
}
if (!z) {
((h) f()).z().d().close();
}
}
}
public long q(OutputStream outputStream, InputStream inputStream, Long l, y5 y5Var, boolean z) throws IOException {
return s.a.a(this, outputStream, inputStream, l, y5Var, z);
}
}