Class CollectingProcessReader
java.lang.Object
com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
com.github.fracpete.processoutput4j.reader.AbstractProcessReader
com.github.fracpete.processoutput4j.reader.CollectingProcessReader
- All Implemented Interfaces:
Runnable
Reader for storing all content.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringBuilderthe string builder to store the data in.Fields inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
m_Reader, m_StdoutFields inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
m_Process, m_Queue, m_Stopped -
Constructor Summary
ConstructorsConstructorDescriptionCollectingProcessReader(boolean stdout, StringBuilder content) Initializes the reader. -
Method Summary
Modifier and TypeMethodDescriptionReturns the string builder for storing the content.protected voidFor processing the line read from stdout/stderr.Methods inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
doRun, flush, isStdoutMethods inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
getProcess, isStopped, logError, logError, run, setProcess, stopExecution
-
Field Details
-
m_Content
the string builder to store the data in.
-
-
Constructor Details
-
CollectingProcessReader
Initializes the reader.- Parameters:
stdout- whether to read stdout or stderrcontent- for storing the content
-
-
Method Details
-
getContent
Returns the string builder for storing the content.- Returns:
- the string builder
-
process
For processing the line read from stdout/stderr.- Specified by:
processin classAbstractProcessReader- Parameters:
line- the output line
-