public abstract class LogOutputStream extends OutputStream
| 构造器和说明 |
|---|
LogOutputStream()
Creates a new instance of this class.
|
LogOutputStream(int level)
Creates a new instance of this class.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Writes all remaining data from the buffer.
|
void |
flush()
Flush this log stream.
|
int |
getMessageLevel() |
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 the user.
|
protected abstract void |
processLine(String line,
int logLevel)
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.
|
writepublic LogOutputStream()
public LogOutputStream(int level)
level - loglevel used to log data written to this stream.public void write(int cc)
throws IOException
write 在类中 OutputStreamcc - data to log (byte).IOExceptionOutputStream.write(int)public void flush()
flush 在接口中 Flushableflush 在类中 OutputStreamOutputStream.flush()public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 OutputStreamIOExceptionOutputStream.close()public int getMessageLevel()
public void write(byte[] b,
int off,
int len)
throws IOException
write 在类中 OutputStreamb - the array containing the dataoff - the offset into the array where data startslen - the length of blockIOException - if the data cannot be written into the stream.OutputStream.write(byte[], int, int)protected void processBuffer()
processLine.protected void processLine(String line)
line - the line to log.protected abstract void processLine(String line, int logLevel)
line - the line to log.logLevel - the log level to useCopyright © 2020. All rights reserved.