Class 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 Detail

      • m_Content

        protected java.lang.StringBuilder m_Content
        the string builder to store the data in.
    • Constructor Detail

      • CollectingProcessReader

        public CollectingProcessReader​(boolean stdout,
                                       java.lang.StringBuilder content)
        Initializes the reader.
        Parameters:
        stdout - whether to read stdout or stderr
        content - for storing the content
    • 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:
        process in class AbstractProcessReader
        Parameters:
        line - the output line