Class PrintStreamWrapper
java.lang.Object
org.jenkinsci.plugins.ParameterizedRemoteTrigger.pipeline.PrintStreamWrapper
Wrapper to provide a
PrintStream
for writing content to
and a corresponding getContent()
method to get the content
which has been written to the PrintStream.
The reason is from the async Pipeline Handle
we don't have
an active TaskListener.getLogger()
anymore this means everything
written to the PrintStream (logger) will not be printed to the Pipeline log.
Therefore we provide this PrintStream for logging and the content can be
obtained later via getContent()
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the streams.Returns all logs since creation and closes the streams.
-
Constructor Details
-
PrintStreamWrapper
- Throws:
UnsupportedEncodingException
-
-
Method Details
-
getPrintStream
-
getContent
Returns all logs since creation and closes the streams.- Returns:
- all logs.
- Throws:
IOException
- if UTF-8 charset is not supported.
-
close
public void close()Closes the streams.
-