Top Description Fields Constructors Methods
javax.usb.event

public Class UsbPipeDataEvent

extends UsbPipeEvent
Class Inheritance
Imports
javax.usb.*

Indicates data was successfully transferred over the UsbPipe.

This event will be fired to all listeners for all data that is transferred over the pipe.

Authors
Dan Streetman, E. Michael Maximilien

Field Summary

Modifier and TypeField and Description
private int
private byte[]

Constructor Summary

AccessConstructor and Description
public
UsbPipeDataEvent(UsbPipe
The UsbPipe.
source
,
byte[]
The data.
d
,
int
The actual length of data transferred.
aL
)

Constructor.

public
UsbPipeDataEvent(UsbPipe
The UsbPipe.
source
,
UsbIrp
The UsbIrp.
uI
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The actual amount of transferred data.
getActualLength
()

Get the actual length.

public byte[]

Returns:

The transferred data.
getData
()

Get the data.

Inherited from javax.usb.event.UsbPipeEvent:
getUsbIrpgetUsbPipehasUsbIrp

Field Detail

actualLengthback to summary
private int actualLength
databack to summary
private byte[] data

Constructor Detail

UsbPipeDataEventback to summary
public UsbPipeDataEvent(UsbPipe source, byte[] d, int aL)

Constructor.

This should only be used if there is no UsbIrp associated with this event.

Parameters
source:UsbPipe

The UsbPipe.

d:byte[]

The data.

aL:int

The actual length of data transferred.

UsbPipeDataEventback to summary
public UsbPipeDataEvent(UsbPipe source, UsbIrp uI)

Constructor.

Parameters
source:UsbPipe

The UsbPipe.

uI:UsbIrp

The UsbIrp.

Method Detail

getActualLengthback to summary
public int getActualLength()

Get the actual length.

Returns:int

The actual amount of transferred data.

getDataback to summary
public byte[] getData()

Get the data.

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.

Returns:byte[]

The transferred data.