|
Groovy JDK |
Method Summary | |
---|---|
Thread
|
consumeProcessErrorStream(OutputStream err)
|
Thread
|
consumeProcessErrorStream(StringBuffer error)
|
Thread
|
consumeProcessErrorStream(Writer err)
|
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()
|
void
|
consumeProcessOutput(StringBuffer output, StringBuffer error)
|
void
|
consumeProcessOutput(OutputStream output, OutputStream error)
|
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(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
|
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. |
Thread
|
consumeProcessOutputStream(StringBuffer output)
|
Thread
|
consumeProcessOutputStream(Writer output)
|
Thread
|
consumeProcessOutputStream(OutputStream output)
|
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. |
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. |
InputStream
|
getErr()
|
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()
|
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()
|
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()
|
String
|
getText()
Read the text of the output stream of the Process. |
Writer
|
leftShift(Object value)
|
OutputStream
|
leftShift(byte[] value)
|
Writer
|
leftShift(Object value)
Overloads the left shift operator (<<) to provide an append mechanism to pipe data to a Process. |
OutputStream
|
leftShift(byte[] value)
Overloads the left shift operator to provide an append mechanism to pipe into a Process |
Process
|
or(Process right)
|
Process
|
or(Process right)
Overrides the or operator to allow one Process to asynchronously pipe data to another Process. |
Process
|
pipeTo(Process right)
|
Process
|
pipeTo(Process right)
Allows one Process to asynchronously pipe data to another Process. |
void
|
waitForOrKill(long numberOfMillis)
|
void
|
waitForOrKill(long numberOfMillis)
Wait for the process to finish during a certain amount of time, otherwise stops the process. |
void
|
waitForProcessOutput()
|
void
|
waitForProcessOutput(StringBuffer output, StringBuffer error)
|
void
|
waitForProcessOutput(OutputStream output, OutputStream error)
|
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(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
|
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
|
withOutputStream(Closure closure)
|
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)
|
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. |
Method Detail |
---|
public Thread consumeProcessErrorStream(OutputStream err)
public Thread consumeProcessErrorStream(StringBuffer error)
public Thread consumeProcessErrorStream(Writer err)
public Thread consumeProcessErrorStream(OutputStream err)
err
- an OutputStream to capture the process stderr.public Thread consumeProcessErrorStream(Appendable error)
error
- an Appendable to capture the process stderr.public void consumeProcessOutput()
public void consumeProcessOutput(StringBuffer output, StringBuffer error)
public void consumeProcessOutput(OutputStream output, OutputStream error)
public void consumeProcessOutput()
public void consumeProcessOutput(Appendable output, Appendable error)
output
- an Appendable to capture the process stdout.error
- an Appendable to capture the process stderr.public void consumeProcessOutput(OutputStream output, OutputStream error)
output
- an OutputStream to capture the process stdout.error
- an OutputStream to capture the process stderr.public Thread consumeProcessOutputStream(StringBuffer output)
public Thread consumeProcessOutputStream(Writer output)
public Thread consumeProcessOutputStream(OutputStream output)
public Thread consumeProcessOutputStream(Appendable output)
output
- an Appendable to capture the process stdout.public Thread consumeProcessOutputStream(OutputStream output)
output
- an OutputStream to capture the process stdout.public InputStream getErr()
public InputStream getErr()
public InputStream getIn()
public InputStream getIn()
public OutputStream getOut()
public OutputStream getOut()
public String getText()
public String getText()
public Writer leftShift(Object value)
public OutputStream leftShift(byte[] value)
public Writer leftShift(Object value)
value
- a value to append.public OutputStream leftShift(byte[] value)
value
- data to append.public Process or(Process right)
public Process or(Process right)
right
- a Process to pipe output to.public Process pipeTo(Process right)
public Process pipeTo(Process right)
right
- a Process to pipe output to.public void waitForOrKill(long numberOfMillis)
public void waitForOrKill(long numberOfMillis)
numberOfMillis
- the number of milliseconds to wait before stopping the process.public void waitForProcessOutput()
public void waitForProcessOutput(StringBuffer output, StringBuffer error)
public void waitForProcessOutput(OutputStream output, OutputStream error)
public void waitForProcessOutput()
public void waitForProcessOutput(Appendable output, Appendable error)
output
- an Appendable to capture the process stdout.error
- an Appendable to capture the process stderr.public void waitForProcessOutput(OutputStream output, OutputStream error)
output
- an OutputStream to capture the process stdout.error
- an OutputStream to capture the process stderr.public void withOutputStream(Closure closure)
public void withOutputStream(Closure closure)
closure
- a closure.public void withWriter(Closure closure)
public void withWriter(Closure closure)
closure
- a closure.
|
Groovy JDK |