Class ProcessStreamConsumer


  • public class ProcessStreamConsumer
    extends java.lang.Object
    Process stream consumer
    • Constructor Summary

      Constructors 
      Constructor Description
      ProcessStreamConsumer​(java.io.InputStream source, IProcessOutputStream processOutputStream, java.io.File optionalSourceFile)
      Constructor for ProcessStreamConsumer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean close()
      Pipe the available bytes from the source stream to the target.
      int pipeAvailableBytes()
      Pipe the available bytes from the source stream to the target.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProcessStreamConsumer

        public ProcessStreamConsumer​(java.io.InputStream source,
                                     IProcessOutputStream processOutputStream,
                                     java.io.File optionalSourceFile)
        Constructor for ProcessStreamConsumer
        Parameters:
        source - the input stream
        processOutputStream - the process output stream
        optionalSourceFile - the optional source file
    • Method Detail

      • pipeAvailableBytes

        public int pipeAvailableBytes()
        Pipe the available bytes from the source stream to the target. In case a prefix is defined it will be inserted after a newline.
        Returns:
        the number of piped data; -1 in case of an error
      • close

        public boolean close()
        Pipe the available bytes from the source stream to the target. In case a prefix is defined it will be inserted after a newline.
        Returns:
        true if the available bytes could be copied without errors.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()