package F0;

import java.util.Arrays;

/* JADX INFO: loaded from: classes.dex */
public final class e extends M0.a {

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public byte[] f2265j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public volatile boolean f2266k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public byte[] f2267l;

    @Override // P0.j
    public final void a() {
        try {
            this.i.g(this.f4141b);
            int iP = 0;
            int i = 0;
            while (iP != -1 && !this.f2266k) {
                byte[] bArr = this.f2265j;
                if (bArr.length < i + 16384) {
                    this.f2265j = Arrays.copyOf(bArr, bArr.length + 16384);
                }
                iP = this.i.p(this.f2265j, i, 16384);
                if (iP != -1) {
                    i += iP;
                }
            }
            if (!this.f2266k) {
                this.f2267l = Arrays.copyOf(this.f2265j, i);
            }
            W3.b.k(this.i);
        } catch (Throwable th) {
            W3.b.k(this.i);
            throw th;
        }
    }

    @Override // P0.j
    public final void b() {
        this.f2266k = true;
    }
}
