package innovimax.mixthem.io;

import innovimax.mixthem.interfaces.IOutputChar;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

/*
    Created by innovimax
    Default implementation of IOutputChar
*/
public class DefaultCharWriter implements IOutputChar {

	private Writer writer = null;

	public DefaultCharWriter(OutputStream output) throws IOException {
		this.writer = new BufferedWriter(new OutputStreamWriter(output));
	}

	@Override
	public void writeCharacter(int c) throws IOException {		
		this.writer.write(c);
	}

	@Override
	public void writeCharacters(char[] buffer, int len) throws IOException {				
		System.out.println("wlen=" + len);
        System.out.println("wbuffer=" + buffer.toString());
		this.writer.write(buffer, 0, len);
	}

}

@@ -708,144 +708,72 @@
 on %7B
-%09%09%09%09%0A%09%09System.out.println(%22wlen=%22 + len);%0A        System.out.println(%22wbuffer=%22 + buffer.toString());%0A%09%09this.writer.write(buffer, 0, len
+      %0A%09%09this.writer.write(buffer, 0, len);%0A%09%09this.writer.flush(
 );%0A%09

Update DefaultCharWriter.java