Class ProcessStreamFactory


  • public final class ProcessStreamFactory
    extends java.lang.Object
    The process stream factory
    • Method Detail

      • getInstance

        public static ProcessStreamFactory getInstance()
        Get the instance
        Returns:
        the instance
      • getStandardOut

        public IProcessOutputStream getStandardOut()
        Get the standard out as process output stream
        Returns:
        the process output stream
      • getStandardOut

        public IProcessOutputStream getStandardOut​(java.lang.String linePrefix)
        Get the standard out as process output stream
        Parameters:
        linePrefix - the line prefix
        Returns:
        the process output stream
      • getStandardOut

        public IProcessOutputStream getStandardOut​(java.lang.String linePrefix,
                                                   IProcessStreamExceptionHandler processStreamExceptionHandler)
        Get the standard out as process output stream
        Parameters:
        linePrefix - the line prefix
        processStreamExceptionHandler - the process stream exception handler or null
        Returns:
        the process output stream
      • getStandardErr

        public IProcessOutputStream getStandardErr()
        Get the standard out as process error stream
        Returns:
        the process output stream
      • getStandardErr

        public IProcessOutputStream getStandardErr​(java.lang.String linePrefix)
        Get the standard out as process error stream
        Parameters:
        linePrefix - the line prefix
        Returns:
        the process output stream
      • getStandardErr

        public IProcessOutputStream getStandardErr​(java.lang.String linePrefix,
                                                   IProcessStreamExceptionHandler processStreamExceptionHandler)
        Get the standard out as process error stream
        Parameters:
        linePrefix - the line prefix
        processStreamExceptionHandler - the process stream exception handler or null
        Returns:
        the process output stream
      • getProcessOutputStream

        public IProcessOutputStream getProcessOutputStream​(java.io.OutputStream os)
        Get a process output stream which is wrapped by a OutputStream.
        Parameters:
        os - the output stream to pass as process output stream
        Returns:
        the process output stream
      • getProcessOutputStream

        public IProcessOutputStream getProcessOutputStream​(java.io.OutputStream os,
                                                           java.lang.String linePrefix)
        Get a process output stream which is wrapped by a OutputStream.
        Parameters:
        os - the output stream to pass as process output stream
        linePrefix - the line prefix
        Returns:
        the process output stream
      • getProcessOutputStream

        public IProcessOutputStream getProcessOutputStream​(java.io.OutputStream os,
                                                           java.lang.String linePrefix,
                                                           IProcessStreamExceptionHandler processStreamExceptionHandler)
        Get a process output stream which is wrapped by a OutputStream.
        Parameters:
        os - the output stream to pass as process output stream
        linePrefix - the line prefix
        processStreamExceptionHandler - the process stream exception handler or null
        Returns:
        the process output stream
      • getProcessBufferOutputStream

        public ProcessBufferOutputStream getProcessBufferOutputStream()
        Get a process output stream buffer
        Returns:
        a process output stream buffer
      • getProcessBufferOutputStream

        public ProcessBufferOutputStream getProcessBufferOutputStream​(java.lang.String linePrefix)
        Get a process output stream buffer
        Parameters:
        linePrefix - the line prefix
        Returns:
        a process output stream buffer
      • getProcessBufferOutputStream

        public ProcessBufferOutputStream getProcessBufferOutputStream​(java.lang.String linePrefix,
                                                                      IProcessStreamExceptionHandler processStreamExceptionHandler)
        Get a process output stream buffer
        Parameters:
        linePrefix - the line prefix
        processStreamExceptionHandler - the process stream exception handler or null
        Returns:
        a process output stream buffer
      • getSlf4jProcessOutputStream

        public IProcessOutputStream getSlf4jProcessOutputStream()
        Get a process output stream buffer
        Returns:
        a process output stream buffer
      • getStandardIn

        public IProcessInputStream getStandardIn()
        Get the standard in as process input stream
        Returns:
        the process input stream
      • getEmptyStandardIn

        public IProcessInputStream getEmptyStandardIn()
        Get the standard in as process input stream
        Returns:
        the process input stream
      • getStandardInFromBuffer

        public IProcessInputStream getStandardInFromBuffer​(java.lang.String buffer)
        Get the standard in read from the buffer as process input stream
        Parameters:
        buffer - the buffer
        Returns:
        the process input stream
      • getStandardInFromFile

        public IProcessInputStream getStandardInFromFile​(java.io.File file)
        Get the standard in as process input stream
        Parameters:
        file - the file as input
        Returns:
        the process input stream
      • getStandardOutProcessStreamExceptionHandler

        public IProcessStreamExceptionHandler getStandardOutProcessStreamExceptionHandler()
        Get the standard in as process input stream
        Returns:
        the process input stream
      • getStandardErrProcessStreamExceptionHandler

        public IProcessStreamExceptionHandler getStandardErrProcessStreamExceptionHandler()
        Get the standard in as process input stream
        Returns:
        the process input stream
      • getSlf4jProcessStreamExceptionHandler

        public IProcessStreamExceptionHandler getSlf4jProcessStreamExceptionHandler()
        Get the standard in as process input stream
        Returns:
        the process input stream