class FastStringWriter extends Writer {

    private final StringBuilder builder;



    public FastStringWriter() {
        super();
        this.builder = new StringBuilder();
    }


    public FastStringWriter(final int initialSize) {
        super();
        if (initialSize < 0) {
            throw new IllegalArgumentException("Negative buffer size");
        }
        this.builder = new StringBuilder(initialSize);
    }




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


    @Override
    public void write(final String str) {
        this.builder.append(str);
    }


    @Override
    public void write(final String str, final int off, final int len)  {
        this.builder.append(str, off, off + len);
    }


    @Override
    public void write(final char[] cbuf) {
        this.builder.append(cbuf, 0, cbuf.length);
    }


    @Override
    public void write(final char[] cbuf, final int off, final int len) {<FILL_FUNCTION_BODY>}



    @Override
    public void flush() throws IOException {
        // Nothing to be flushed
    }


    @Override
    public void close() throws IOException {
        // Nothing to be closed
    }


    @Override
    public String toString() {
        return this.builder.toString();
    }

}

        if ((off < 0) || (off > cbuf.length) || (len < 0) ||
                ((off + len) > cbuf.length) || ((off + len) < 0)) {
            throw new IndexOutOfBoundsException();
        } else if (len == 0) {
            return;
        }
        this.builder.append(cbuf, off, len);
    
<methods>public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException,public java.io.Writer append(char) throws java.io.IOException,public java.io.Writer append(java.lang.CharSequence, int, int) throws java.io.IOException,public abstract void close() throws java.io.IOException,public abstract void flush() throws java.io.IOException,public static java.io.Writer nullWriter() ,public void write(int) throws java.io.IOException,public void write(char[]) throws java.io.IOException,public void write(java.lang.String) throws java.io.IOException,public abstract void write(char[], int, int) throws java.io.IOException,public void write(java.lang.String, int, int) throws java.io.IOException<variables>private static final int WRITE_BUFFER_SIZE,protected java.lang.Object lock,private char[] writeBuffer