APKPure.apk(点击下载) / n.java


package e.w.h.c;

import androidx.recyclerview.widget.RecyclerView;
import com.tencent.raft.measure.utils.MeasureConst;
import e.w.h.c.o;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public final class n extends Thread {
    public final /* synthetic */ String b;
    public final /* synthetic */ o.a c;

    public n(String str, o.a aVar) {
        this.b = str;
        this.c = aVar;
    }

    public void run() {
        Throwable th;
        OutputStream outputStream;
        Exception e2;
        InputStream inputStream = null;
        try {
            HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://tbs.imtt.qq.com/plugin/DebugPlugin_v2.tbs").openConnection();
            int contentLength = httpURLConnection.getContentLength();
            httpURLConnection.setConnectTimeout(MeasureConst.DEFAULT_REPORT_DELAY_TIME);
            httpURLConnection.connect();
            InputStream inputStream2 = httpURLConnection.getInputStream();
            try {
                FileOutputStream o2 = b.o(new File(this.b));
                byte[] bArr = new byte[RecyclerView.a0.FLAG_BOUNCED_FROM_HIDDEN_LIST];
                int i2 = 0;
                while (true) {
                    int read = inputStream2.read(bArr);
                    if (read <= 0) {
                        break;
                    }
                    i2 += read;
                    o2.write(bArr, 0, read);
                    m mVar = (m) this.c;
                    mVar.f12732a.post(new k(mVar, (i2 * 100) / contentLength));
                }
                m mVar2 = (m) this.c;
                mVar2.f12732a.post(new j(mVar2));
                try {
                    inputStream2.close();
                } catch (Exception e3) {
                    e3.printStackTrace();
                }
                try {
                    o2.close();
                } catch (Exception e4) {
                    e4.printStackTrace();
                }
            } catch (Exception e5) {
                e2 = e5;
                outputStream = null;
                inputStream = inputStream2;
                try {
                    e2.printStackTrace();
                    m mVar3 = (m) this.c;
                    mVar3.f12732a.post(new l(mVar3));
                    try {
                        inputStream.close();
                    } catch (Exception e6) {
                        e6.printStackTrace();
                    }
                    outputStream.close();
                } catch (Throwable th2) {
                    th = th2;
                    try {
                        inputStream.close();
                    } catch (Exception e7) {
                        e7.printStackTrace();
                    }
                    try {
                        outputStream.close();
                    } catch (Exception e8) {
                        e8.printStackTrace();
                    }
                    throw th;
                }
            } catch (Throwable th3) {
                th = th3;
                outputStream = null;
                inputStream = inputStream2;
                inputStream.close();
                outputStream.close();
                throw th;
            }
        } catch (Exception e9) {
            e2 = e9;
            outputStream = null;
            e2.printStackTrace();
            m mVar32 = (m) this.c;
            mVar32.f12732a.post(new l(mVar32));
            inputStream.close();
            outputStream.close();
        } catch (Throwable th4) {
            th = th4;
            outputStream = null;
            inputStream.close();
            outputStream.close();
            throw th;
        }
    }
}