View Javadoc

    1   package org.codehaus.groovy.runtime;
    2
    3   import java.io.OutputStreamWriter;
    4   import java.io.OutputStream;
    5   import java.io.IOException;
    6
    7   /***
    8    *
    9    *
    10   * <p>Création: 18 avr. 2004</p>
    11   *
    12   * @author Guillaume Laforge
    13   *
    14   * @since Release x.x.x
    15   * @cvs.revision $Revision: 1.1 $
    16   * @cvs.tag $Name:  $
    17   * @cvs.author $Author: glaforge $
    18   * @cvs.date $Date: 2004/04/18 19:35:56 $
    19   */
    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  }