Package com.atlassian.bamboo.command
Class StreamToListPumper
java.lang.Object
com.atlassian.bamboo.command.StreamToListPumper
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
ErrorStreamToListPumper
This class pumps the contents of an input stream into a list (as well as the build logs). It is designed to be executed within a thread.
Basically a variation of the Ant StreamPumper that puts in the output in a list
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStreamToListPumper
(InputStream inputStream, Collection<String> outputList, BuildLogger buildLogger, String planKey) Pump the given inputStream into the given outputList -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
pump
(BufferedReader reader) Pump the reader into myOutputList.void
run()
Convert the input stream into a list within the thread
-
Field Details
-
buildLogger
-
planKey
-
-
Constructor Details
-
StreamToListPumper
public StreamToListPumper(InputStream inputStream, Collection<String> outputList, BuildLogger buildLogger, String planKey) Pump the given inputStream into the given outputList- Parameters:
inputStream
- input data streamoutputList
- resulting collection of linesbuildLogger
- the logger for the buildplanKey
- the plankey for the build
-
-
Method Details
-
run
public void run()Convert the input stream into a list within the thread -
pump
Pump the reader into myOutputList.- Parameters:
reader
- The reader- Throws:
IOException
- Something went wrong
-
log
-