Pdf Converter v5.0版本的 MD5 值为:258149214e8277c73fa6b365aba312ef

以下内容为反编译后的 b.java 源代码,内容仅作参考


package m4;

import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import androidx.camera.core.impl.o0;
import com.google.firebase.perf.network.FirebasePerfOkHttpClient;
import java.io.File;
import java.io.FileOutputStream;
import java.net.URL;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import l4.e5;
import m4.b;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.ResponseBody;
import qd.s;
import y.e0;
import y.j0;
public final class b {
    public static final ExecutorService f21136a;
    public static final Handler f21137b;

    public interface a {
        void a(File file);

        void b();

        void c(File file);
    }

    static {
        ExecutorService newCachedThreadPool = Executors.newCachedThreadPool();
        ed.i.e("newCachedThreadPool()", newCachedThreadPool);
        f21136a = newCachedThreadPool;
        f21137b = new Handler(Looper.getMainLooper());
    }

    public static final void a(String str, Context context, final a aVar, t3.c cVar) {
        ed.i.f("s3Path", str);
        ed.i.f("context", context);
        String str2 = k4.c.f19801a;
        final URL url = new URL("https://dxkg84bpf137r.cloudfront.net/".concat(str));
        StringBuilder sb2 = new StringBuilder();
        File externalFilesDir = context.getExternalFilesDir(null);
        sb2.append(String.valueOf(externalFilesDir != null ? externalFilesDir.getAbsolutePath() : null));
        sb2.append('/');
        sb2.append(str);
        final String sb3 = sb2.toString();
        boolean exists = new File(sb3).exists();
        Handler handler = f21137b;
        if (exists) {
            Log.d("AWSCF", "File already exists");
            handler.post(new e0(1, aVar, sb3));
            return;
        }
        if (cVar != null) {
            cVar.e();
        }
        Log.d("AWSCF", String.valueOf(new File(sb3).getParent()));
        String parent = new File(sb3).getParent();
        if (parent != null && !new File(parent).exists()) {
            if (!new File(parent).mkdirs()) {
                handler.post(new androidx.activity.k(4, aVar));
                return;
            }
            Log.d("AWSCF", "Directory created successfully");
        }
        if (new File(sb3).createNewFile()) {
            Log.d("AWSCF", "File created");
            f21136a.execute(new Runnable() {
                @Override
                public final void run() {
                    Handler handler2 = b.f21137b;
                    URL url2 = url;
                    ed.i.f("$fileUrl", url2);
                    String str3 = sb3;
                    ed.i.f("$localPath", str3);
                    b.a aVar2 = aVar;
                    ed.i.f("$callBack", aVar2);
                    try {
                        OkHttpClient okHttpClient = new OkHttpClient();
                        Request build = new Request.Builder().url(url2).build();
                        Log.d("myFile", "File is start to downloading");
                        ResponseBody body = FirebasePerfOkHttpClient.execute(okHttpClient.newCall(build)).body();
                        FileOutputStream fileOutputStream = new FileOutputStream(new File(str3));
                        if (body == null) {
                            if (new File(str3).exists()) {
                                new File(str3).delete();
                            }
                            handler2.post(new o0(2, aVar2));
                            return;
                        }
                        s a10 = ba.j.a(ba.j.l(fileOutputStream));
                        a10.u(body.source());
                        a10.close();
                        handler2.post(new j0(2, aVar2, str3));
                    } catch (Exception unused) {
                        if (new File(str3).exists()) {
                            new File(str3).delete();
                        }
                        handler2.post(new s.n(3, aVar2));
                    }
                }
            });
            return;
        }
        Log.d("AWSCF", "Failed to create file");
        handler.post(new e5(1, aVar));
    }
}