|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.util.thread.v1.IOThreadRunner
Loops, reading from the input stream and writes to the output stream.
LoopThread
Constructor Summary | |
IOThreadRunner(java.io.InputStream is,
java.io.OutputStream os)
Create a new ThreadRunner, re-routing is data into the os stream. |
|
IOThreadRunner(LoopThread lt,
java.io.InputStream is,
java.io.OutputStream os)
Create a new ThreadRunner, re-routing is data into the os stream, but uses the initialization of the given LoopThread. |
Method Summary | |
java.io.IOException |
getException()
Retrieves the most recent exception that occured, if any. |
java.io.OutputStream |
getOutputStream()
Retrieves the output stream that the input is redirected to. |
LoopThread |
getThread()
Retrieves the LoopThread instance that manages the operation. |
boolean |
isReading()
|
protected void |
reachedEOF()
Stop the reading and void out any exceptions. |
protected void |
registerException(java.io.IOException ioe)
Post an exception, and stop the reading. |
void |
setCloseInputOnStop(boolean on)
By setting this to true the runner will close the InputStream once a Stop signal has been encountered. |
void |
setCloseOutputOnStop(boolean on)
By setting this to true the runner will close the OutputStream once a Stop signal has been encountered. |
void |
start()
Starts the stream reading. |
void |
stop()
Stops the thread from reading. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IOThreadRunner(java.io.InputStream is, java.io.OutputStream os)
public IOThreadRunner(LoopThread lt, java.io.InputStream is, java.io.OutputStream os)
Method Detail |
public java.io.IOException getException()
public void setCloseInputOnStop(boolean on)
public void setCloseOutputOnStop(boolean on)
public LoopThread getThread()
public java.io.OutputStream getOutputStream()
public boolean isReading()
public void start()
public void stop() throws java.io.IOException
java.io.IOException
protected void registerException(java.io.IOException ioe)
protected void reachedEOF()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |