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 and description |
|---|
LogOutputStream
()Creates a new instance of this class. |
LogOutputStream
(int level)Creates a new instance of this class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
close()Writes all remaining data from the buffer. |
|
void |
flush()Flush this log stream. |
|
int |
getMessageLevel()@return the trace level of the log system |
|
protected void |
processBuffer()Converts the buffer to a string and sends it to processLine. |
|
protected void |
processLine(java.lang.String line)Logs a line to the log system of the user. |
|
protected void |
processLine(java.lang.String line, int logLevel)Logs a line to the log system of the user. |
|
void |
write(int cc)Write the data to the buffer and flush the buffer, if a line separator is detected. |
|
void |
write(byte[] b, int off, int len)Write a block of characters to the output stream |
| Methods inherited from class | Name |
|---|---|
class java.io.OutputStream |
java.io.OutputStream#write([B, int, int), java.io.OutputStream#write([B), java.io.OutputStream#write(int), java.io.OutputStream#flush(), java.io.OutputStream#close(), java.io.OutputStream#wait(long, int), java.io.OutputStream#wait(long), java.io.OutputStream#wait(), java.io.OutputStream#equals(java.lang.Object), java.io.OutputStream#toString(), java.io.OutputStream#hashCode(), java.io.OutputStream#getClass(), java.io.OutputStream#notify(), java.io.OutputStream#notifyAll() |
Creates a new instance of this class. Uses the default level of 999.
Creates a new instance of this class.
level - loglevel used to log data written to this stream.Writes all remaining data from the buffer.
Flush this log stream.
Converts the buffer to a string and sends it to processLine.
Logs a line to the log system of the user.
line
- the line to log.Logs a line to the log system of the user.
line - the line to log.logLevel - the log level to useWrite the data to the buffer and flush the buffer, if a line separator is detected.
cc - data to log (byte).Write a block of characters to the output stream
b - the array containing the dataoff - the offset into the array where data startslen - the length of block