public class LoggingOutputStream extends FilterOutputStream
LoggingByteArrayOutputStream.
out| Constructor and Description |
|---|
LoggingOutputStream(OutputStream
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
LoggingByteArrayOutputStream |
getLogStream()
Returns the log stream.
|
void |
write(byte[] b, int off, int len)
|
void |
write(int b)
|
flush, writepublic LoggingOutputStream(OutputStreamoutputStream, Logger logger, Level loggingLevel, int contentLoggingLimit)
outputStream - output stream to forward all writes to
logger - logger
loggingLevel - logging level
contentLoggingLimit - maximum number of bytes to log (may be
0 to avoid logging content)
public void write(int b)
throws IOException
write in class
FilterOutputStream
IOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class
FilterOutputStream
IOException
public void close()
throws IOException
close in interface
Closeable
close in interface
AutoCloseable
close in class
FilterOutputStream
IOException
public final LoggingByteArrayOutputStreamgetLogStream()