JUnitTask.JUnitLogOutputStream (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.junit, class: JUnitTask, class: JUnitLogOutputStream

# Class JUnitTask.JUnitLogOutputStream

java.lang.Object
java.io.OutputStream
org.apache.tools.ant.util.LineOrientedOutputStream
org.apache.tools.ant.taskdefs.LogOutputStream
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.JUnitLogOutputStream

All Implemented Interfaces:
  `Closeable, Flushable, AutoCloseable`

Enclosing class:
  `JUnitTask`

protected static class JUnitTask.JUnitLogOutputStream extends LogOutputStream
A stream handler for handling the junit task.

Since:
  Ant 1.7

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JUnitLogOutputStream(Task task, int level)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `processLine(String line, int level)`
  Logs a line.

  ### Methods inherited from class LogOutputStream

  `getMessageLevel, processBuffer, processLine`
  Modifier and Type
  Method
  Description
  `int`
  `getMessageLevel()`
  Get the level.
  `protected void`
  `processBuffer()`
  Converts the buffer to a string and sends it to `processLine`
  `protected void`
  `processLine(String line)`
  Logs a line to the log system of ant.

  ### Methods inherited from class LineOrientedOutputStream

  `close, flush, processLine, write, write`
  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Writes all remaining
  `void`
  `flush()`
  Flush this log stream
  `protected void`
  `processLine(byte[] line)`
  Processes a line.
  `final void`
  `write(byte[] b, int off, int len)`
  Write a block of characters to the output stream
  `final void`
  `write(int cc)`
  Write the data to the buffer and flush the buffer, if a line separator is detected.

  ### Methods inherited from class OutputStream

  `nullOutputStream, write`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JUnitLogOutputStream

    public JUnitLogOutputStream(Task task, int level)
    Constructor.
    Parameters:
      `task` - the task being logged.
      `level` - the log level used to log data written to this stream.

- ## Method Details

  - ### processLine

    protected void processLine(String line, int level)
    Logs a line. If the line starts with junit.framework.TestListener: set the level to MSG_VERBOSE.
    Overrides:
      `processLine` in class `LogOutputStream`
    Parameters:
      `line` - the line to log.
      `level` - the logging level to use.