svoid drainStreamToPrint_charByChar_onChar_onLine(InputStream stream, IF0 enabled, IVF1 onChar, IVF1 onLine) ctex { InputStreamReader in = new(stream); new StringBuilder buf; int c; while ((c = in.read()) >= 0) { if (enabled == null || enabled!) { S s = str((char) c); print_noNewLine(s); callF(onChar, (char) c); buf.append(s); if (c == '\n') callF(onLine, getAndClearStringBuilder(buf)); } } }