类 LogOutputStream
java.lang.Object
java.io.OutputStream
com.sh.common.exec.LogOutputStream
- 所有已实现的接口:
Closeable,Flushable,AutoCloseable
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
构造器概要
构造器构造器说明Creates a new instance of this class.LogOutputStream(int level) Creates a new instance of this class. -
方法概要
修饰符和类型方法说明voidclose()Writes all remaining data from the buffer.voidflush()Flush this log stream.intprotected voidConverts the buffer to a string and sends it toprocessLine.protected voidprocessLine(String line) Logs a line to the log system of the user.protected abstract voidprocessLine(String line, int level) Logs a line to the log system of the user.voidwrite(byte[] b, int off, int len) Write a block of characters to the output streamvoidwrite(int cc) Write the data to the buffer and flush the buffer, if a line separator is detected.从类继承的方法 java.io.OutputStream
nullOutputStream, write
-
构造器详细资料
-
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
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
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
Write a block of characters to the output stream- 覆盖:
write在类中OutputStream- 参数:
b- the array containing the dataoff- the offset into the array where data startslen- 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 toprocessLine. -
processLine
Logs a line to the log system of the user.- 参数:
line- the line to log.
-
processLine
Logs a line to the log system of the user.- 参数:
line- the line to log.level- the log level to use
-