Package jflex.logging

Class StdOutWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public final class StdOutWriter extends PrintWriter
Convenience class for JFlex stdout, redirects output to a TextArea if in GUI mode.
Version:
JFlex 1.8.2
Author:
Gerwin Klein
  • Constructor Details

    • StdOutWriter

      public StdOutWriter()
      A StdOutWriter, attached to System.out, no gui mode
    • StdOutWriter

      public StdOutWriter(OutputStream out)
      A StdOutWrite, attached to the specified output stream, no gui mode
      Parameters:
      out - a OutputStream object.
  • Method Details

    • setGUIMode

      public void setGUIMode(TextArea text)
      Set the TextArea to write text to. Will continue to write to System.out if text is null .
      Parameters:
      text - the TextArea to write to
    • write

      public void write(int c)
      Write a single character.
      Overrides:
      write in class PrintWriter
      Parameters:
      c - a int.
    • write

      public void write(char[] buf, int off, int len)

      Write a portion of an array of characters.

      Overrides:
      write in class PrintWriter
    • write

      public void write(String s, int off, int len)

      Write a portion of a string.

      Overrides:
      write in class PrintWriter
    • println

      public void println()
      Begin a new line. Which actual character/s is/are written depends on the runtime platform.
      Overrides:
      println in class PrintWriter