1 package org.codehaus.groovy.runtime; 2 3 import java.io.OutputStreamWriter ; 4 import java.io.OutputStream ; 5 import java.io.IOException ; 6 7 20 public class FlushingStreamWriter extends OutputStreamWriter { 21 22 public FlushingStreamWriter(OutputStream out) { 23 super(out); 24 } 25 26 public void write(char[] cbuf, int off, int len) throws IOException { 27 super.write(cbuf, off, len); 28 flush(); 29 } 30 31 public void write(int c) throws IOException { 32 super.write(c); 33 flush(); 34 } 35 36 public void write(String str, int off, int len) throws IOException { 37 super.write(str, off, len); 38 flush(); 39 } 40 } 41 | Popular Tags |