package com.tencent.map.lib.gl;

import com.tencent.matrix.trace.core.AppMethodBeat;
import java.io.Writer;

class e$l extends Writer {
    private StringBuilder a = new StringBuilder();

    e$l() {
        AppMethodBeat.i(98096);
        AppMethodBeat.o(98096);
    }

    public void close() {
        AppMethodBeat.i(98097);
        a();
        AppMethodBeat.o(98097);
    }

    public void flush() {
        AppMethodBeat.i(98098);
        a();
        AppMethodBeat.o(98098);
    }

    public void write(char[] cArr, int i, int i2) {
        AppMethodBeat.i(98099);
        for (int i3 = 0; i3 < i2; i3++) {
            char c = cArr[i + i3];
            if (c == 10) {
                a();
            } else {
                this.a.append(c);
            }
        }
        AppMethodBeat.o(98099);
    }

    private void a() {
        AppMethodBeat.i(98100);
        if (this.a.length() > 0) {
            this.a.delete(0, this.a.length());
        }
        AppMethodBeat.o(98100);
    }
}
