public class UsbPipeDataEvent extends UsbPipeEvent
This event will be fired to all listeners for all data that is transferred over the pipe.
| Constructor and Description |
|---|
UsbPipeDataEvent(UsbPipe source,
byte[] d,
int aL)
Constructor.
|
UsbPipeDataEvent(UsbPipe source,
UsbIrp uI)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getActualLength()
Get the actual length.
|
byte[] |
getData()
Get the data.
|
getUsbIrp, getUsbPipe, hasUsbIrppublic UsbPipeDataEvent(UsbPipe source, byte[] d, int aL)
This should only be used if there is no UsbIrp associated with this event.
source - The UsbPipe.d - The data.aL - The actual length of data transferred.public byte[] getData()
If there is an associated UsbIrp, this returns a new byte[] containing only the actual transferred data. If there is no associated UsbIrp, this returns the actual data buffer used.
public int getActualLength()