Class LoggingStreamingContent
java.lang.Object
com.google.api.client.util.LoggingStreamingContent
- All Implemented Interfaces:
StreamingContent
Wraps another streaming content without modifying the content, but also logging content using
LoggingOutputStream.
Implementation is not thread-safe.
- Since:
- 1.14
- Author:
- Yaniv Inbar
-
Constructor Summary
ConstructorsConstructorDescriptionLoggingStreamingContent(StreamingContent content, Logger logger, Level loggingLevel, int contentLoggingLimit) -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteTo(OutputStream out) Writes the byte content to the given output stream.
-
Constructor Details
-
LoggingStreamingContent
public LoggingStreamingContent(StreamingContent content, Logger logger, Level loggingLevel, int contentLoggingLimit) - Parameters:
content- streaming contentlogger- loggerloggingLevel- logging levelcontentLoggingLimit- maximum number of bytes to log or0to avoid logging content
-
-
Method Details
-
writeTo
Description copied from interface:StreamingContentWrites the byte content to the given output stream.Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the output stream has not been closed, and will fail to work if it has been closed.
- Specified by:
writeToin interfaceStreamingContent- Parameters:
out- output stream- Throws:
IOException
-