Package ptolemy.util

Class StringBufferExec

    • Field Detail

      • buffer

        public java.lang.StringBuffer buffer
        The StringBuffer to which the output is appended. This variable is public so that callers can clear the buffer as necessary.
    • Constructor Detail

      • StringBufferExec

        public StringBufferExec()
        Create a StringBufferExec. As the commands are executed, output is appended to the StringBuffer - no output will appear on stderr and stdout.
      • StringBufferExec

        public StringBufferExec​(boolean appendToStderrAndStdout)
        Create a StringBufferExec and optionally append to stderr and stdout as the commands are executed.
        Parameters:
        appendToStderrAndStdout - If true, then as the commands are executed, the output is append to stderr and stdout.
    • Method Detail

      • stderr

        public void stderr​(java.lang.String text)
        Append the text message to the StringBuffer. The output automatically gets a trailing end of line character(s) appended. Optionally, the text also appears on stderr
        Specified by:
        stderr in interface ExecuteCommands
        Overrides:
        stderr in class StreamExec
        Parameters:
        text - The text to append.
      • stdout

        public void stdout​(java.lang.String text)
        Append the text message to the StringBuffer. The output automatically gets end of line character(s) appended. Optionally, the text also appears on stdout.
        Specified by:
        stdout in interface ExecuteCommands
        Overrides:
        stdout in class StreamExec
        Parameters:
        text - The text to append.