Return type | Name and parameters |
---|---|
void
|
closeStreams()
Closes all the streams associated with the process (ignoring any IOExceptions). |
Thread
|
consumeProcessErrorStream(OutputStream err)
Gets the error stream from a process and reads it to keep the process from blocking due to a full buffer. |
Thread
|
consumeProcessErrorStream(Appendable error)
Gets the error stream from a process and reads it to keep the process from blocking due to a full buffer. |
void
|
consumeProcessOutput()
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
void
|
consumeProcessOutput(OutputStream output, OutputStream error)
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
void
|
consumeProcessOutput(Appendable output, Appendable error)
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
Thread
|
consumeProcessOutputStream(OutputStream output)
Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. |
Thread
|
consumeProcessOutputStream(Appendable output)
Gets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. |
InputStream
|
getErr()
An alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion. |
InputStream
|
getIn()
An alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion. |
OutputStream
|
getOut()
An alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion. |
String
|
getText()
Read the text of the output stream of the Process. |
OutputStream
|
leftShift(byte[] value)
Overloads the left shift operator to provide an append mechanism to pipe into a Process |
Writer
|
leftShift(Object value)
Overloads the left shift operator (<<) to provide an append mechanism to pipe data to a Process. |
Process
|
or(Process right)
Overrides the or operator to allow one Process to asynchronously pipe data to another Process. |
Process
|
pipeTo(Process right)
Allows one Process to asynchronously pipe data to another Process. |
void
|
waitForOrKill(long numberOfMillis)
Wait for the process to finish during a certain amount of time, otherwise stops the process. |
void
|
waitForProcessOutput()
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
void
|
waitForProcessOutput(OutputStream output, OutputStream error)
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
void
|
waitForProcessOutput(Appendable output, Appendable error)
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. |
void
|
withOutputStream(Closure closure)
Creates a new buffered OutputStream as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
void
|
withWriter(Closure closure)
Creates a new BufferedWriter as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. |
addShutdownHook
, any
, any
, asBoolean
, asType
, collect
, collect
, collect
, dump
, each
, eachMatch
, eachMatch
, eachWithIndex
, every
, every
, find
, find
, findAll
, findAll
, findIndexOf
, findIndexOf
, findIndexValues
, findIndexValues
, findLastIndexOf
, findLastIndexOf
, findResult
, findResult
, findResult
, findResult
, getAt
, getMetaClass
, getMetaPropertyValues
, getProperties
, grep
, grep
, hasProperty
, identity
, inject
, inject
, inspect
, invokeMethod
, is
, isCase
, isNotCase
, iterator
, metaClass
, print
, print
, printf
, printf
, println
, println
, println
, putAt
, respondsTo
, respondsTo
, setMetaClass
, split
, sprintf
, sprintf
, stream
, tap
, toString
, use
, use
, use
, with
, with
, withCloseable
, withMethodClosure
, withStream
, withTraits
Closes all the streams associated with the process (ignoring any IOExceptions).
Gets the error stream from a process and reads it to keep the process from blocking due to a full buffer. The processed stream data is appended to the supplied OutputStream. A new Thread is started, so this method will return immediately.
err
- an OutputStream to capture the process stderrGets the error stream from a process and reads it to keep the process from blocking due to a full buffer. The processed stream data is appended to the supplied Appendable. A new Thread is started, so this method will return immediately.
error
- an Appendable to capture the process stderrGets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The stream data is thrown away but blocking due to a full output buffer is avoided. Use this method if you don't care about the standard or error output and just want the process to run silently - use carefully however, because since the stream data is thrown away, it might be difficult to track down when something goes wrong. For this, two Threads are started, so this method will return immediately.
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied OutputStream. For this, two Threads are started, so this method will return immediately. The threads will not be join()ed, even if waitFor() is called. To wait for the output to be fully consumed call waitForProcessOutput().
output
- an OutputStream to capture the process stdouterror
- an OutputStream to capture the process stderrGets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied Appendable. For this, two Threads are started, so this method will return immediately. The threads will not be join()ed, even if waitFor() is called. To wait for the output to be fully consumed call waitForProcessOutput().
output
- an Appendable to capture the process stdouterror
- an Appendable to capture the process stderrGets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied OutputStream. A new Thread is started, so this method will return immediately.
output
- an OutputStream to capture the process stdoutGets the output stream from a process and reads it to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied Appendable. A new Thread is started, so this method will return immediately.
output
- an Appendable to capture the process stdoutAn alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion.
An alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion.
An alias method so that a process appears similar to System.out, System.in, System.err; you can use process.in, process.out, process.err in a similar fashion.
Read the text of the output stream of the Process. Closes all the streams associated with the process after retrieving the text.
Overloads the left shift operator to provide an append mechanism to pipe into a Process
value
- data to appendOverloads the left shift operator (<<) to provide an append mechanism to pipe data to a Process.
value
- a value to appendOverrides the or operator to allow one Process to asynchronously pipe data to another Process.
right
- a Process to pipe output toAllows one Process to asynchronously pipe data to another Process.
right
- a Process to pipe output toWait for the process to finish during a certain amount of time, otherwise stops the process.
numberOfMillis
- the number of milliseconds to wait before stopping the processGets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The stream data is thrown away but blocking due to a full output buffer is avoided. Use this method if you don't care about the standard or error output and just want the process to run silently - use carefully however, because since the stream data is thrown away, it might be difficult to track down when something goes wrong. For this, two Threads are started, but join()ed, so we wait. As implied by the waitFor... name, we also wait until we finish as well. Finally, the output and error streams are closed.
Gets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied OutputStream. For this, two Threads are started, but join()ed, so we wait. As implied by the waitFor... name, we also wait until we finish as well. Finally, the input, output and error streams are closed.
output
- an OutputStream to capture the process stdouterror
- an OutputStream to capture the process stderrGets the output and error streams from a process and reads them to keep the process from blocking due to a full output buffer. The processed stream data is appended to the supplied Appendable. For this, two Threads are started, but join()ed, so we wait. As implied by the waitFor... name, we also wait until we finish as well. Finally, the input, output and error streams are closed.
output
- an Appendable to capture the process stdouterror
- an Appendable to capture the process stderrCreates a new buffered OutputStream as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. A new Thread is started, so this method will return immediately.
closure
- a closureCreates a new BufferedWriter as stdin for this process, passes it to the closure, and ensures the stream is flushed and closed after the closure returns. A new Thread is started, so this method will return immediately.
closure
- a closure