package X6FRs_4.IMuAHx_6.KNBe_11;

import android.util.Log;
import androidx.recyclerview.widget.RecyclerView;
import java.io.Writer;
/* compiled from: LogWriter.java */
/* loaded from: classes.dex */
public class QxJ9d_1 extends Writer {
    public final String KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public StringBuilder f415KQgRr5e_0 = new StringBuilder((int) RecyclerView.WGk6X_27.FLAG_IGNORE);

    public QxJ9d_1(String str) {
        this.KQgRr5e_0 = str;
    }

    public final void KQgRr5e_0() {
        if (this.f415KQgRr5e_0.length() > 0) {
            Log.d(this.KQgRr5e_0, this.f415KQgRr5e_0.toString());
            StringBuilder sb = this.f415KQgRr5e_0;
            sb.delete(0, sb.length());
        }
    }

    @Override // java.io.Writer, java.io.Closeable, java.lang.AutoCloseable
    public void close() {
        KQgRr5e_0();
    }

    @Override // java.io.Writer, java.io.Flushable
    public void flush() {
        KQgRr5e_0();
    }

    @Override // java.io.Writer
    public void write(char[] cArr, int i, int i2) {
        for (int i3 = 0; i3 < i2; i3++) {
            char c = cArr[i + i3];
            if (c == '\n') {
                KQgRr5e_0();
            } else {
                this.f415KQgRr5e_0.append(c);
            }
        }
    }
}
