package p461;

import java.io.IOException;
import java.io.InputStream;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.p411.p413.C6635;

/* JADX INFO: renamed from: ޑ.ދ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C7115 implements InterfaceC7129 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final InputStream f20650;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final C7130 f20651;

    public C7115(InputStream inputStream, C7130 c7130) {
        if (inputStream == null) {
            C6635.m9824("input");
            throw null;
        }
        if (c7130 == null) {
            C6635.m9824("timeout");
            throw null;
        }
        this.f20650 = inputStream;
        this.f20651 = c7130;
    }

    @Override // p461.InterfaceC7129, java.io.Closeable, java.lang.AutoCloseable
    public void close() throws IOException {
        this.f20650.close();
    }

    public String toString() {
        StringBuilder sbM4889 = C2803.m4889("source(");
        sbM4889.append(this.f20650);
        sbM4889.append(')');
        return sbM4889.toString();
    }

    @Override // p461.InterfaceC7129
    /* JADX INFO: renamed from: ؠ */
    public long mo10207(C7103 c7103, long j) throws IOException {
        if (c7103 == null) {
            C6635.m9824("sink");
            throw null;
        }
        if (j == 0) {
            return 0L;
        }
        if (!(j >= 0)) {
            throw new IllegalArgumentException(C2803.m4874("byteCount < 0: ", j).toString());
        }
        try {
            this.f20651.mo10464();
            C7123 c7123M10423 = c7103.m10423(1);
            int i = this.f20650.read(c7123M10423.f20665, c7123M10423.f20667, (int) Math.min(j, 8192 - c7123M10423.f20667));
            if (i != -1) {
                c7123M10423.f20667 += i;
                long j2 = i;
                c7103.f20630 += j2;
                return j2;
            }
            if (c7123M10423.f20666 != c7123M10423.f20667) {
                return -1L;
            }
            c7103.f20629 = c7123M10423.m10475();
            C7125.f20674.m10480(c7123M10423);
            return -1L;
        } catch (AssertionError e) {
            if (C4303.m7126(e)) {
                throw new IOException(e);
            }
            throw e;
        }
    }

    @Override // p461.InterfaceC7129
    /* JADX INFO: renamed from: ށ */
    public C7130 mo10277() {
        return this.f20651;
    }
}
