ErrorConsumer, InputProvider, OutputConsumerpublic class Pipe extends java.lang.Object implements InputProvider, OutputConsumer, ErrorConsumer
You can use the same Pipe-object for both ends of a process-pipeline. But you cannot use the same Pipe-object as an OutputConsumer and ErrorConsumer at the same time.
| Modifier and Type | Field | Description |
|---|---|---|
static int |
BUFFER_SIZE |
Default buffer size of the pipe.
|
| Constructor | Description |
|---|---|
Pipe(java.io.InputStream pSource,
java.io.OutputStream pSink) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
consumeError(java.io.InputStream pInputStream) |
The ErrorConsumer must read the error of a process from the given
InputStream.
|
void |
consumeOutput(java.io.InputStream pInputStream) |
The OutputConsumer must read the output of a process from the given
InputStream.
|
void |
provideInput(java.io.OutputStream pOutputStream) |
The InputProvider must write the input to the given OutputStream.
|
public static final int BUFFER_SIZE
public Pipe(java.io.InputStream pSource,
java.io.OutputStream pSink)
public void provideInput(java.io.OutputStream pOutputStream)
throws java.io.IOException
provideInput in interface InputProviderjava.io.IOExceptionpublic void consumeOutput(java.io.InputStream pInputStream)
throws java.io.IOException
consumeOutput in interface OutputConsumerjava.io.IOExceptionpublic void consumeError(java.io.InputStream pInputStream)
throws java.io.IOException
consumeError in interface ErrorConsumerjava.io.IOException