public interface CommandProcess
extends java.lang.AutoCloseable
false
.Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush pending write operations.
|
boolean |
isClosed()
Check if current process has been closed.
|
boolean |
isRunning()
Check if current process is still opened.
|
java.lang.String |
read()
Read output until a null line is read.
|
java.lang.String |
read(OutputHandler handler)
Read output until:
A null line is read.
Handler returns false when line is read.
Since command process will not be closed, a simple string
is returned (an exit status cannot be computed).
|
void |
write(java.lang.Iterable<java.lang.String> inputs)
Write set of inputs to the current process.
|
void |
write(java.lang.String input,
java.lang.String... others)
Write input string to the current process.
|
java.lang.String read() throws java.io.IOException
java.io.IOException
- If an error occurred during operation.java.lang.String read(OutputHandler handler) throws java.io.IOException
handler
- Output handler.java.io.IOException
- If an error occurred during operation.void write(java.lang.String input, java.lang.String... others) throws java.io.IOException
input
- Input.others
- Other inputs.java.io.IOException
- If an error occurred during operation.void write(java.lang.Iterable<java.lang.String> inputs) throws java.io.IOException
inputs
- Collection of inputs.java.io.IOException
- If an error occurred during operation.void flush() throws java.io.IOException
java.io.IOException
- If an error occurred during operation.boolean isRunning()
true
, then isClosed()
should return false
.true
if process is open, false
otherwise.boolean isClosed()
true
, then isRunning()
should return false
.true
if process is closed, false
otherwise.Copyright © 2018. All Rights Reserved.