Hi Commons IO Developers,

I noticed that StringBuilderWriter currently (in version 2.20.0) overrides
Writer methods write(char[], int, int) and write(String), but does not
override write(int). This means that whenever write(int) is called on a
StringBuilderWriter instance, it falls back to the implementation in
Writer, which is very costly compared to simply appending a char to a
StringBuilder.

I suggest adding this method to StringBuilderWriter:

@Override
public void write(final int c) {
    builder.append((char) c);
}

Thanks & regards,
Botond Kósa
botond.k...@gmail.com

Reply via email to