package ᨨ;

import java.io.IOException;
import java.io.OutputStream;
import ඓ.K.K.K.C1293;

/* renamed from: ᨨ.Ԕ  reason: contains not printable characters */
/* compiled from: Okio */
public final class C1472 implements AbstractC1473 {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final /* synthetic */ OutputStream f5491;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final /* synthetic */ C1477 f5492;

    public C1472(C1477 r1, OutputStream outputStream) {
        this.f5492 = r1;
        this.f5491 = outputStream;
    }

    @Override // ᨨ.AbstractC1473, java.io.Closeable, java.lang.AutoCloseable
    public void close() throws IOException {
        this.f5491.close();
    }

    @Override // ᨨ.AbstractC1473, java.io.Flushable
    public void flush() throws IOException {
        this.f5491.flush();
    }

    @Override // ᨨ.AbstractC1473
    public C1477 timeout() {
        return this.f5492;
    }

    public String toString() {
        StringBuilder r0 = C1293.m3416("sink(");
        r0.append(this.f5491);
        r0.append(")");
        return r0.toString();
    }

    @Override // ᨨ.AbstractC1473
    /* renamed from: K  reason: contains not printable characters */
    public void m3691(C1492 r7, long j) throws IOException {
        C1491.m3764(r7.f5529, 0, j);
        while (j > 0) {
            this.f5492.m3701();
            C1475 r0 = r7.f5530;
            int min = (int) Math.min(j, (long) (r0.f5494 - r0.f5496));
            this.f5491.write(r0.f5498, r0.f5496, min);
            r0.f5496 += min;
            long j2 = (long) min;
            j -= j2;
            r7.f5529 -= j2;
            if (r0.f5496 == r0.f5494) {
                r7.f5530 = r0.m3696();
                C1497.m3827(r0);
            }
        }
    }
}
