Package org.apache.syncope.common.lib
Class LogOutputStream
java.lang.Object
java.io.OutputStream
org.apache.syncope.common.lib.LogOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Delegates output stream writing onto an SLF4J logger.
Inspired by
org.apache.commons.exec.LogOutputStream-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Writes all remaining data from the buffer.voidflush()Flush this log stream.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.Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
LogOutputStream
-
-
Method Details
-
write
public void write(int cc) Write the data to the buffer and flush the buffer, if a line separator is detected.- Specified by:
writein classOutputStream- Parameters:
cc- data to log (byte).
-
flush
public void flush()Flush this log stream.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream
-
close
Writes all remaining data from the buffer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException- if an I/O error occurs- See Also:
-
write
public void write(byte[] b, int off, int len) Write a block of characters to the output stream- Overrides:
writein classOutputStream- Parameters:
b- the array containing the dataoff- the offset into the array where data startslen- the length of block
-