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:
java.lang.Runnable
public class CollectingProcessReader extends AbstractProcessReader
Reader for storing all content.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringBuilderm_Contentthe string builder to store the data in.-
Fields inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
m_Reader, m_Stdout
-
Fields inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
m_Process, m_Queue, m_Stopped
-
-
Constructor Summary
Constructors Constructor Description CollectingProcessReader(boolean stdout, java.lang.StringBuilder content)Initializes the reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuildergetContent()Returns the string builder for storing the content.protected voidprocess(java.lang.String line)For processing the line read from stdout/stderr.-
Methods inherited from class com.github.fracpete.processoutput4j.reader.AbstractProcessReader
doRun, flush, isStdout
-
Methods inherited from class com.github.fracpete.processoutput4j.core.AbstractProcessRunnable
getProcess, isStopped, logError, logError, run, setProcess, stopExecution
-
-
-
-
Method Detail
-
getContent
public java.lang.StringBuilder getContent()
Returns the string builder for storing the content.- Returns:
- the string builder
-
process
protected void process(java.lang.String line)
For processing the line read from stdout/stderr.- Specified by:
processin classAbstractProcessReader- Parameters:
line- the output line
-
-