Class LogOutputStream

java.lang.Object
java.io.OutputStream
org.zeroturnaround.exec.stream.LogOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Direct Known Subclasses:
Slf4jOutputStream

public abstract class LogOutputStream extends OutputStream
Base class to connect a logging system to the output and/or error stream of then external process. The implementation parses the incoming data to construct a line and passes the complete line to an user-defined implementation.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Writes all remaining data from the buffer.
    void
    Flush this log stream.
    protected void
    Converts the buffer to a string and sends it to processLine.
    protected abstract void
    Logs a line to the log system of the user.
    void
    write(byte[] b, int off, int len)
    Write a block of characters to the output stream
    void
    write(int cc)
    Write the data to the buffer and flush the buffer, if a line separator is detected.

    Methods inherited from class java.io.OutputStream

    nullOutputStream, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogOutputStream

      public LogOutputStream()
  • Method Details