类 LogOutputStream

java.lang.Object
java.io.OutputStream
com.sh.common.exec.LogOutputStream
所有已实现的接口:
Closeable, Flushable, AutoCloseable

public abstract class LogOutputStream extends OutputStream
Description: Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
  • 构造器详细资料

    • LogOutputStream

      public LogOutputStream()
      Creates a new instance of this class. Uses the default level of 999.
    • LogOutputStream

      public LogOutputStream(int level)
      Creates a new instance of this class.
      参数:
      level - loglevel used to log data written to this stream.
  • 方法详细资料

    • write

      public void write(int cc) throws IOException
      Write the data to the buffer and flush the buffer, if a line separator is detected.
      指定者:
      write 在类中 OutputStream
      参数:
      cc - data to log (byte).
      抛出:
      IOException
      另请参阅:
    • flush

      public void flush()
      Flush this log stream.
      指定者:
      flush 在接口中 Flushable
      覆盖:
      flush 在类中 OutputStream
      另请参阅:
    • close

      public void close() throws IOException
      Writes all remaining data from the buffer.
      指定者:
      close 在接口中 AutoCloseable
      指定者:
      close 在接口中 Closeable
      覆盖:
      close 在类中 OutputStream
      抛出:
      IOException
      另请参阅:
    • getMessageLevel

      public int getMessageLevel()
      返回:
      the trace level of the log system
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Write a block of characters to the output stream
      覆盖:
      write 在类中 OutputStream
      参数:
      b - the array containing the data
      off - the offset into the array where data starts
      len - the length of block
      抛出:
      IOException - if the data cannot be written into the stream.
      另请参阅:
    • processBuffer

      protected void processBuffer()
      Converts the buffer to a string and sends it to processLine.
    • processLine

      protected void processLine(String line)
      Logs a line to the log system of the user.
      参数:
      line - the line to log.
    • processLine

      protected abstract void processLine(String line, int level)
      Logs a line to the log system of the user.
      参数:
      line - the line to log.
      level - the log level to use