|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.sys.TaskObject
ewe.io.IOTransfer
This class is used to copy from one stream to another asynchronously.
| Field Summary | |
int |
bufferSize
|
int |
checkTime
This is how long it waits (in milliseconds) between checking the task Handle for an abort request. |
int |
copied
This is the number of bytes copied so far. |
Stream |
in
|
Stream |
out
|
int |
sleepTime
|
boolean |
stopAfterTotalToCopy
Set this to true if you want to stop after totalToCopy has been reached. |
int |
totalToCopy
If you know how many bytes are to be copied, then set this value. |
protected boolean |
transferred
|
| Fields inherited from class ewe.sys.TaskObject |
handle, interruptThreadToStop, myThread, napIterations, napTime, shouldStop |
| Constructor Summary | |
IOTransfer()
After calling this constructor you can call start(Stream in,Stream out) to begin the transfer operation running asynchronously. |
|
IOTransfer(Stream in,
Stream out)
After calling this constructor you can call startTask() to begin the transfer operation running asynchronously. |
|
IOTransfer(Stream in,
Stream out,
int totalToCopy)
After calling this constructor you can call startTask() to begin the transfer operation running asynchronously. |
|
| Method Summary | |
void |
closeStreams()
|
protected void |
doRun()
This is the method that runs in its own Coroutine thread. |
boolean |
run(Stream in,
Stream out)
Deprecated. - use transfer(in,out) instead. |
Handle |
start(Stream in,
Stream out)
Start the transfer asynchronously and return a Handle. |
protected boolean |
transfer()
This is the method that runs in its own Coroutine thread. |
void |
transfer(Stream in,
Stream out)
Copy from the "in" stream to the "out" stream. |
| Methods inherited from class ewe.sys.TaskObject |
checkAbortFail, checkFailure, doStart, doStop, exec, getHandle, nap, run, setNapTime, show, sleep, start, startTask, stopTask, waitOn, waitOnAny, waitOnSuccess, yield, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public Stream in
public Stream out
public int bufferSize
public int sleepTime
public int checkTime
public int copied
public int totalToCopy
public boolean stopAfterTotalToCopy
protected boolean transferred
| Constructor Detail |
public IOTransfer()
public IOTransfer(Stream in,
Stream out)
public IOTransfer(Stream in,
Stream out,
int totalToCopy)
| Method Detail |
public Handle start(Stream in,
Stream out)
public boolean run(Stream in,
Stream out)
public void transfer(Stream in,
Stream out)
throws IOException
IOExceptionprotected boolean transfer()
protected void doRun()
doRun in class TaskObjectpublic void closeStreams()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||