com.cloudgarden.audio
Class TransferEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.cloudgarden.audio.TransferEvent
All Implemented Interfaces:
java.io.Serializable

public class TransferEvent
extends java.util.EventObject

Class to hold information when a TransferListener signals an event.

See Also:
Serialized Form

Field Summary
static int BYTES_TRANSFERRED
           
static int READ
           
static int WRITE
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TransferEvent(java.lang.Object source, int id, byte[] data, int offset, int length, int direction)
          Creates a new instance of TransferEvent
 
Method Summary
 byte[] getData()
          Returns reference to data being transferred
 int getDirection()
          Returns direction of data transfer - either READ or WRITE
 int getId()
          Returns the id of this event - BYTES_TRANSFERRED.
 int getLength()
          Returns length (in bytes) of data
 int getOffset()
          Returns offset of start of valid data
 java.lang.String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BYTES_TRANSFERRED

public static final int BYTES_TRANSFERRED

READ

public static final int READ

WRITE

public static final int WRITE
Constructor Detail

TransferEvent

public TransferEvent(java.lang.Object source,
                     int id,
                     byte[] data,
                     int offset,
                     int length,
                     int direction)
Creates a new instance of TransferEvent
Method Detail

getLength

public int getLength()
Returns length (in bytes) of data

getDirection

public int getDirection()
Returns direction of data transfer - either READ or WRITE

getOffset

public int getOffset()
Returns offset of start of valid data

getData

public byte[] getData()
Returns reference to data being transferred

getId

public int getId()
Returns the id of this event - BYTES_TRANSFERRED.

toString

public java.lang.String toString()
Overrides:
toString in class java.util.EventObject