terp - the Codemesh Modular
Template Interpreter v1.3.309

com.codemesh.terp.util
Class StreamPumper

java.lang.Object
  extended by com.codemesh.terp.util.StreamPumper
All Implemented Interfaces:
java.lang.Runnable

public class StreamPumper
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
StreamPumper(java.io.InputStream is, java.io.OutputStream os)
          Creates a new stream pumper.
 
Method Summary
 java.lang.Exception getException()
          Returns the thrown exception if there was one.
 void run()
          Performs the copy operation from input to output.
 void stop()
          Stops the pumper but does not interrupt a blocking read.
 void waitFor()
          Blocks until the pumper is finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamPumper

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

Parameters:
is - the input stream
os - the output stream.
Method Detail

run

public void run()
Performs the copy operation from input to output.

Specified by:
run in interface java.lang.Runnable

stop

public void stop()
Stops the pumper but does not interrupt a blocking read.


waitFor

public void waitFor()
             throws java.lang.InterruptedException
Blocks until the pumper is finished.

Throws:
java.lang.InterruptedException - if interrupted.

getException

public java.lang.Exception getException()
Returns the thrown exception if there was one.

Returns:
the exception that was thrown.

terp - the Codemesh Modular
Template Interpreter v1.3.309

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.