Package org.zeroturnaround.exec.stream
Interface ExecuteStreamHandler
- All Known Implementing Classes:
PumpStreamHandler
public interface ExecuteStreamHandler
Used by
Execute
to handle input and output stream of
subprocesses.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Install a handler for the error stream of the subprocess.void
Install a handler for the input stream of the subprocess.void
Install a handler for the output stream of the subprocess.void
start()
Start handling of the streams.void
stop()
Stop handling of the streams - will not be restarted.
-
Method Details
-
setProcessInputStream
Install a handler for the input stream of the subprocess.- Parameters:
os
- output stream to write to the standard input stream of the subprocess- Throws:
IOException
- throws a IO exception in case of IO issues of the underlying stream
-
setProcessErrorStream
Install a handler for the error stream of the subprocess.- Parameters:
is
- input stream to read from the error stream from the subprocess- Throws:
IOException
- throws a IO exception in case of IO issues of the underlying stream
-
setProcessOutputStream
Install a handler for the output stream of the subprocess.- Parameters:
is
- input stream to read from the error stream from the subprocess- Throws:
IOException
- throws a IO exception in case of IO issues of the underlying stream
-
start
Start handling of the streams.- Throws:
IOException
- throws a IO exception in case of IO issues of the underlying stream
-
stop
void stop()Stop handling of the streams - will not be restarted. Will wait for pump threads to complete.
-