javax.usb.event
Class UsbDeviceDataEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.usb.event.UsbDeviceEvent
          extended by javax.usb.event.UsbDeviceDataEvent
All Implemented Interfaces:
java.io.Serializable

public class UsbDeviceDataEvent
extends UsbDeviceEvent

Indicates data was successfully transferred over the Default Control Pipe.

This event will be fired on all successful transfers of data over the DCP.

Author:
Dan Streetman, E. Michael Maximilien
See Also:
Serialized Form

Constructor Summary
UsbDeviceDataEvent(UsbDevice source, UsbControlIrp irp)
          Constructor.
 
Method Summary
 byte[] getData()
          Get the data.
 UsbControlIrp getUsbControlIrp()
          Get the UsbControlIrp associated with this event.
 
Methods inherited from class javax.usb.event.UsbDeviceEvent
getUsbDevice
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsbDeviceDataEvent

public UsbDeviceDataEvent(UsbDevice source,
                          UsbControlIrp irp)
Constructor.

Parameters:
source - The UsbDevice.
irp - The UsbControlIrp.
Method Detail

getData

public byte[] getData()
Get the data.

This is a new byte[] whose length is the actual amount of transferred data. The contents is a copy of the transferred data.

Returns:
The transferred data.

getUsbControlIrp

public UsbControlIrp getUsbControlIrp()
Get the UsbControlIrp associated with this event.

Returns:
The UsbControlIrp.