()
| 289 | } |
| 290 | |
| 291 | private void inPipeWatcher() throws IOException { |
| 292 | if ( inPipe == null ) { |
| 293 | PipedOutputStream pout = new PipedOutputStream(); |
| 294 | out = new PrintStream( pout ); |
| 295 | inPipe = new PipedInputStream(pout); |
| 296 | } |
| 297 | byte [] ba = new byte [256]; // arbitrary blocking factor |
| 298 | int read; |
| 299 | while ( (read = inPipe.read(ba)) != -1 ) |
| 300 | print( new String(ba, 0, read) ); |
| 301 | |
| 302 | println("Console: Input closed..."); |
| 303 | } |
| 304 | |
| 305 | public void run() { |
| 306 | try { |