public class BufferedPipe extends Object
The original intended usage for this class is:
Process process = ...; new BufferedPipe(process.getInputStream(), System.out); new BufferedPipe(process.getErrorStream(), System.err);
On construction this immediately creates a new thread that buffers the InputStream until no more data is available.
(I'm surprised/confused the PipedInputStream and PipedOutputStream are so narrowly defined that they don't already support this functionality?)
| Constructor and Description |
|---|
BufferedPipe(InputStream
|
BufferedPipe(InputStream
|
public BufferedPipe(InputStreamin, PrintStream out)
public BufferedPipe(InputStreamin, PrintStream out, String prefix)
protected void process(Strings)
s - the new line of text to process.