Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.arranger.jarl.util
Class ProcessStreamMonitor.StreamPumper  view ProcessStreamMonitor.StreamPumper download ProcessStreamMonitor.StreamPumper.java

java.lang.Object
  extended bycom.arranger.jarl.util.ProcessStreamMonitor.StreamPumper
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ProcessStreamMonitor

protected static class ProcessStreamMonitor.StreamPumper
extends java.lang.Object
implements java.lang.Runnable


Field Summary
private  boolean finished
           
private  java.io.InputStream is
           
private  java.io.OutputStream os
           
private static int SIZE
           
private static int SLEEP
           
 
Constructor Summary
ProcessStreamMonitor.StreamPumper(java.io.InputStream is, java.io.OutputStream os)
          Create a new stream pumper.
 
Method Summary
 boolean isFinished()
          Tells whether the end of the stream has been reached.
 void run()
          Copies data from the input stream to the output stream.
 void waitFor()
          This method blocks until the stream pumper finishes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SLEEP

private static final int SLEEP
See Also:
Constant Field Values

SIZE

private static final int SIZE
See Also:
Constant Field Values

is

private java.io.InputStream is

os

private java.io.OutputStream os

finished

private boolean finished
Constructor Detail

ProcessStreamMonitor.StreamPumper

public ProcessStreamMonitor.StreamPumper(java.io.InputStream is,
                                         java.io.OutputStream os)
Create a new stream pumper.

Method Detail

run

public void run()
Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.

Specified by:
run in interface java.lang.Runnable

isFinished

public boolean isFinished()
Tells whether the end of the stream has been reached.


waitFor

public void waitFor()
             throws java.lang.InterruptedException
This method blocks until the stream pumper finishes.