ewe.io
Class IOHandle

java.lang.Object
  extended byewe.sys.Handle
      extended byewe.io.IOHandle
All Implemented Interfaces:
Task, TimerProc

public class IOHandle
extends Handle

This is used for asynchronous IO operations. See the Stream interface for examples.


Field Summary
 int bytesTransferred
          This reports the number of bytes transferred.
static int IO_ABORTED
          This is returned during a read/write operation when a read/write request is made but the operation has been aborted by a call to stop() on this handle.
static int IO_ERROR
          This is a general IO_ERROR.
 long ioLocation
          This is used in the case of RandomAccessStreams.
 boolean pleaseAbort
          This can be used to request an abort - but it is not for general use.
static int STREAM_CLOSED
          This is returned during a read/write operation when a read/write request is made but the stream has been closed.
static int STREAM_END_REACHED
          This is returned during a read operation when a read request is made but the end of the input stream has been reached.
 
Fields inherited from class ewe.sys.Handle
Aborted, Changed, doing, error, errorCode, errorObject, Failed, Failure, nativeResult, progress, progressResolution, returnValue, Running, shouldStop, startTime, state, Stopped, stopReason, Succeeded, Success, task
 
Constructor Summary
IOHandle()
           
 
Method Summary
 void stop(int reason)
          This tells the handle to ask its associated task to stop.
 
Methods inherited from class ewe.sys.Handle
callBackOnAnyFlag, callBackOnFlags, callWhenStopped, callWhenStopped, cancelCallBack, changed, check, check, checkAny, clearTag, doCallBackOnFlags, fail, failed, getErrorText, getHandle, getSubHandle, getSubHandle, getTag, getTask, hasStopped, resetProgress, resetTime, set, setFlags, setProgress, setTag, start, startDoing, startTask, stopAlsoIfStopped, stopTask, ticked, waitOn, waitOn, waitOn, waitOn, waitOnAny, waitOnAny, waitOnAny, waitOnAny, waitOnAnyFlag, waitOnFlags, waitOnFlags, waitUntilStopped, waitUntilStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

IO_ERROR

public static final int IO_ERROR
This is a general IO_ERROR.

See Also:
Constant Field Values

STREAM_END_REACHED

public static final int STREAM_END_REACHED
This is returned during a read operation when a read request is made but the end of the input stream has been reached.

See Also:
Constant Field Values

STREAM_CLOSED

public static final int STREAM_CLOSED
This is returned during a read/write operation when a read/write request is made but the stream has been closed.

See Also:
Constant Field Values

IO_ABORTED

public static final int IO_ABORTED
This is returned during a read/write operation when a read/write request is made but the operation has been aborted by a call to stop() on this handle.

See Also:
Constant Field Values

bytesTransferred

public int bytesTransferred
This reports the number of bytes transferred.


pleaseAbort

public boolean pleaseAbort
This can be used to request an abort - but it is not for general use.


ioLocation

public long ioLocation
This is used in the case of RandomAccessStreams.

Constructor Detail

IOHandle

public IOHandle()
Method Detail

stop

public void stop(int reason)
Description copied from class: Handle
This tells the handle to ask its associated task to stop. It does not guarantee to immediately stop the task. The task, because it may be an asynchronous task, will do so on its own time.

Overrides:
stop in class Handle