public class Pipe extends 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 and Description |
|---|---|
static int |
BUFFER_SIZE
Default buffer size of the pipe.
|
| Constructor and Description |
|---|
Pipe(InputStream pSource,
OutputStream pSink)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consumeError(InputStream pInputStream)
The ErrorConsumer must read the error of a process from the given
InputStream.
|
void |
consumeOutput(InputStream pInputStream)
The OutputConsumer must read the output of a process from the given
InputStream.
|
void |
provideInput(OutputStream pOutputStream)
The InputProvider must write the input to the given OutputStream.
|
public static final int BUFFER_SIZE
public Pipe(InputStream pSource, OutputStream pSink)
public void provideInput(OutputStream pOutputStream) throws IOException
provideInput in interface InputProviderIOExceptionpublic void consumeOutput(InputStream pInputStream) throws IOException
consumeOutput in interface OutputConsumerIOExceptionpublic void consumeError(InputStream pInputStream) throws IOException
consumeError in interface ErrorConsumerIOExceptionCopyright © 2019. All rights reserved.