package p421.p433.p434.p445;

import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;
import p138.p176.p177.p242.p246.p251.C4303;
import p421.p433.p434.p439.p440.AbstractC6797;
import p421.p433.p434.p439.p440.C6800;
import p421.p433.p434.p442.C6817;
import p421.p433.p434.p442.C6822;
import p421.p433.p434.p442.C6828;
import p421.p433.p434.p444.C6837;
import p421.p433.p434.p445.AbstractC6848;

/* JADX INFO: renamed from: ޏ.ؠ.֏.ބ.ޅ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C6850 extends AbstractC6843<C6851> {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public char[] f19883;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public AbstractC6797 f19884;

    /* JADX INFO: renamed from: ޏ.ؠ.֏.ބ.ޅ$֏, reason: contains not printable characters */
    public static class C6851 extends AbstractC6845 {

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public String f19885;

        public C6851(String str, Charset charset) {
            super(charset);
            this.f19885 = str;
        }
    }

    public C6850(C6828 c6828, char[] cArr, AbstractC6848.C6849 c6849) {
        super(c6828, c6849);
        this.f19883 = cArr;
    }

    @Override // p421.p433.p434.p445.AbstractC6848
    /* JADX INFO: renamed from: ֏ */
    public long mo9990(Object obj) {
        return C4303.m7149(this.f19872.f19780.f19746);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C6800 m9996(Charset charset) throws IOException {
        List<C6822> list;
        this.f19884 = C4303.m7072(this.f19872);
        C6828 c6828 = this.f19872;
        C6817 c6817 = c6828.f19780;
        C6822 c6822 = (c6817 == null || (list = c6817.f19746) == null || list.size() == 0) ? null : c6828.f19780.f19746.get(0);
        if (c6822 != null) {
            this.f19884.m9965(c6822);
        }
        return new C6800(this.f19884, this.f19883, charset);
    }

    @Override // p421.p433.p434.p445.AbstractC6848
    /* JADX INFO: renamed from: ֏ */
    public void mo9991(Object obj, C6837 c6837) throws IOException {
        C6851 c6851 = (C6851) obj;
        try {
            C6800 c6800M9996 = m9996(c6851.f19874);
            try {
                for (C6822 c6822 : this.f19872.f19780.f19746) {
                    if (c6822.f19737.startsWith("__MACOSX")) {
                        c6837.m9980(c6822.f19734);
                    } else {
                        this.f19884.m9965(c6822);
                        m9987(c6800M9996, c6822, c6851.f19885, null, c6837);
                        m9992();
                    }
                }
                c6800M9996.close();
            } finally {
            }
        } finally {
            AbstractC6797 abstractC6797 = this.f19884;
            if (abstractC6797 != null) {
                abstractC6797.close();
            }
        }
    }
}
