public class LoggingOutputStream
extends java.io.FilterOutputStream
LoggingByteArrayOutputStream
.Constructor and Description |
---|
LoggingOutputStream(java.io.OutputStream outputStream,
java.util.logging.Logger logger,
java.util.logging.Level loggingLevel,
int contentLoggingLimit) |
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) |
public LoggingOutputStream(java.io.OutputStream outputStream, java.util.logging.Logger logger, java.util.logging.Level loggingLevel, int contentLoggingLimit)
outputStream
- output stream to forward all writes tologger
- loggerloggingLevel
- logging levelcontentLoggingLimit
- maximum number of bytes to log (may be 0
to avoid logging
content)public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
public final LoggingByteArrayOutputStream getLogStream()
Copyright © 2011-2018 Google. All Rights Reserved.