public class LoggingInputStream extends FilterInputStream
LoggingByteArrayOutputStream
.in
Constructor and Description |
---|
LoggingInputStream(InputStream inputStream,
Logger logger,
Level loggingLevel,
int contentLoggingLimit) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
LoggingByteArrayOutputStream |
getLogStream()
Returns the log stream.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
available, mark, markSupported, read, reset, skip
public LoggingInputStream(InputStream inputStream, Logger logger, Level loggingLevel, int contentLoggingLimit)
inputStream
- input stream to forward all reads tologger
- loggerloggingLevel
- logging levelcontentLoggingLimit
- maximum number of bytes to log (may be 0
to avoid logging
content)public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
public final LoggingByteArrayOutputStream getLogStream()
Copyright © 2011–2023 Google. All rights reserved.