Package weka.core

Examples of weka.core.Tee


    // print streams (instantiate only once!)
    teeDone = !((m_TeeOut == null) && (m_TeeErr == null));
    if (!DEBUG) {
      if (!teeDone) {
        m_TeeOut = new Tee(System.out);
        System.setOut(m_TeeOut);
      }
      m_TeeOut.add(
          new LogWindowPrintStream(this, m_TeeOut.getDefault(), STYLE_STDOUT));
    }

    if (!teeDone) {
      m_TeeErr = new Tee(System.err);
      System.setErr(m_TeeErr);
    }
    m_TeeErr.add(
        new LogWindowPrintStream(this, m_TeeErr.getDefault(), STYLE_STDERR));
  }
View Full Code Here


   */
  protected void initialize() {
    super.initialize();
   
    try {
      m_StdOut = new Tee(System.out);
      System.setOut(m_StdOut);
      m_StreamOut = new OutputPrintStream(this, m_StdOut.getDefault());
      m_StdOut.add(m_StreamOut);
     
      m_StdErr = new Tee(System.err);
      System.setErr(m_StdErr);
      m_StreamErr = new OutputPrintStream(this, m_StdErr.getDefault());
      m_StdErr.add(m_StreamErr);
    }
    catch (Exception e) {
View Full Code Here

    // print streams (instantiate only once!)
    teeDone = !((m_TeeOut == null) && (m_TeeErr == null));
    if (!DEBUG) {
      if (!teeDone) {
        m_TeeOut = new Tee(System.out);
        System.setOut(m_TeeOut);
      }
      m_TeeOut.add(
          new LogWindowPrintStream(this, m_TeeOut.getDefault(), STYLE_STDOUT));
    }

    if (!teeDone) {
      m_TeeErr = new Tee(System.err);
      System.setErr(m_TeeErr);
    }
    m_TeeErr.add(
        new LogWindowPrintStream(this, m_TeeErr.getDefault(), STYLE_STDERR));
  }
View Full Code Here

    // print streams (instantiate only once!)
    teeDone = !((m_TeeOut == null) && (m_TeeErr == null));
    if (!DEBUG) {
      if (!teeDone) {
        m_TeeOut = new Tee(System.out);
        System.setOut(m_TeeOut);
      }
      m_TeeOut.add(
          new LogWindowPrintStream(this, m_TeeOut.getDefault(), STYLE_STDOUT));
    }

    if (!teeDone) {
      m_TeeErr = new Tee(System.err);
      System.setErr(m_TeeErr);
    }
    m_TeeErr.add(
        new LogWindowPrintStream(this, m_TeeErr.getDefault(), STYLE_STDERR));
  }
View Full Code Here

   */
  protected void initFinish() {
    // Redirect System.out to the text area
    try {
      PipedInputStream pio = new PipedInputStream(m_POO);
      Tee teeOut = new Tee(System.out);
      System.setOut(teeOut);
      teeOut.add(new PrintStream(m_POO));
      Reader reader = new InputStreamReader(pio);
      m_OutRedirector = new ReaderToTextPane(reader, getOutput(), Color.BLACK);
      m_OutRedirector.start();
    }
    catch (Exception e) {
      System.err.println("Error redirecting stdout");
      e.printStackTrace();
      m_OutRedirector = null;
    }

    // Redirect System.err to the text area
    try {
      PipedInputStream pie = new PipedInputStream(m_POE);
      Tee teeErr = new Tee(System.err);
      System.setErr(teeErr);
      teeErr.add(new PrintStream(m_POE));
      Reader reader = new InputStreamReader(pie);
      m_ErrRedirector = new ReaderToTextPane(reader, getOutput(), Color.RED);
      m_ErrRedirector.start();
    }
    catch (Exception e) {
View Full Code Here

TOP

Related Classes of weka.core.Tee

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.