public class LoggingInputStream
extends java.io.FilterInputStream
LoggingByteArrayOutputStream.| Constructor and Description |
|---|
LoggingInputStream(java.io.InputStream inputStream,
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.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
public LoggingInputStream(java.io.InputStream inputStream,
java.util.logging.Logger logger,
java.util.logging.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 java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOExceptionpublic final LoggingByteArrayOutputStream getLogStream()
Copyright © 2011-2018 Google. All Rights Reserved.