|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.usb.util.DefaultUsbIrp
public class DefaultUsbIrp
UsbIrp default implementation.
The behavior and defaults follow those defined in the interface.
Any of the fields may be updated if the default is not appropriate; in most cases
the data will be the only field that needs to be set.
| Constructor Summary | |
|---|---|
DefaultUsbIrp()
Constructor. |
|
DefaultUsbIrp(byte[] data)
Constructor. |
|
DefaultUsbIrp(byte[] data,
int offset,
int length,
boolean shortPacket)
Constructor. |
|
| Method Summary | |
|---|---|
void |
complete()
Complete this submission. |
boolean |
getAcceptShortPacket()
Get the Short Packet policy. |
int |
getActualLength()
Get the actual length. |
byte[] |
getData()
Get the data. |
int |
getLength()
Get the length. |
int |
getOffset()
Get the offset. |
UsbException |
getUsbException()
Get the UsbException. |
boolean |
isComplete()
If this is complete. |
boolean |
isUsbException()
If a UsbException occurred. |
void |
setAcceptShortPacket(boolean accept)
Set the Short Packet policy. |
void |
setActualLength(int l)
Set the actual length. |
void |
setComplete(boolean b)
Set this as complete (or not). |
void |
setData(byte[] d)
Set the data. |
void |
setData(byte[] d,
int o,
int l)
Set the data, offset, and length. |
void |
setLength(int l)
Set the length. |
void |
setOffset(int o)
Set the offset. |
void |
setUsbException(UsbException exception)
Set the UsbException. |
void |
waitUntilComplete()
Wait until complete. |
void |
waitUntilComplete(long timeout)
Wait until complete, or the timeout has expired. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultUsbIrp()
public DefaultUsbIrp(byte[] data)
data - The data.
java.lang.IllegalArgumentException - If the data is null.
public DefaultUsbIrp(byte[] data,
int offset,
int length,
boolean shortPacket)
data - The data.offset - The offset.length - The length.shortPacket - The Short Packet policy.
java.lang.IllegalArgumentException - If the data is null, or the offset and/or length is negative.| Method Detail |
|---|
public byte[] getData()
getData in interface UsbIrppublic int getOffset()
getOffset in interface UsbIrppublic int getLength()
getLength in interface UsbIrppublic int getActualLength()
getActualLength in interface UsbIrp
public void setData(byte[] d,
int o,
int l)
throws java.lang.IllegalArgumentException
setData in interface UsbIrpd - The data.o - The offset.l - The length.
java.lang.IllegalArgumentException - If the data is null, or the offset and/or length is negative.
public void setData(byte[] d)
throws java.lang.IllegalArgumentException
setData in interface UsbIrpd - The data.
java.lang.IllegalArgumentException - If the data is null.
public void setOffset(int o)
throws java.lang.IllegalArgumentException
setOffset in interface UsbIrpo - The offset.
java.lang.IllegalArgumentException - If the offset is negative.
public void setLength(int l)
throws java.lang.IllegalArgumentException
setLength in interface UsbIrpl - The length.
java.lang.IllegalArgumentException - If the length is negative.
public void setActualLength(int l)
throws java.lang.IllegalArgumentException
setActualLength in interface UsbIrpl - The actual length.
java.lang.IllegalArgumentException - If the length is negative.public boolean isUsbException()
isUsbException in interface UsbIrppublic UsbException getUsbException()
getUsbException in interface UsbIrppublic void setUsbException(UsbException exception)
setUsbException in interface UsbIrpexception - The UsbException.public boolean getAcceptShortPacket()
getAcceptShortPacket in interface UsbIrppublic void setAcceptShortPacket(boolean accept)
setAcceptShortPacket in interface UsbIrpaccept - The Short Packet policy.public boolean isComplete()
isComplete in interface UsbIrppublic void setComplete(boolean b)
setComplete in interface UsbIrpb - If this is complete (or not).public void complete()
This will:
Set this complete.waiting Threads.
complete in interface UsbIrppublic void waitUntilComplete()
complete.
This will block until this is complete.
waitUntilComplete in interface UsbIrppublic void waitUntilComplete(long timeout)
complete, or the timeout has expired.
This will block until this is complete,
or the timeout has expired. If the timeout is 0 or less,
this behaves as the no-timeout method.
waitUntilComplete in interface UsbIrptimeout - The maximum number of milliseconds to wait.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||