|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.codeminders.hidapi.HIDDevice
public class HIDDevice
Instance of this class represents an open HID device.
| Field Summary | |
|---|---|
protected long |
peer
|
| Constructor Summary | |
|---|---|
protected |
HIDDevice(long peer)
Set peer to object. |
| Method Summary | |
|---|---|
void |
close()
Close open device. |
void |
disableBlocking()
Disable blocking reads for this HIDDevice object. |
void |
enableBlocking()
Enable blocking reads for this HIDDevice object. |
boolean |
equals(java.lang.Object obj)
Method to compare HIDDevice object instances. |
protected void |
finalize()
Destructor to destroy the HIDDevice object. |
int |
getFeatureReport(byte[] buf)
Get a Feature Report from a HID device. |
java.lang.String |
getIndexedString(int string_index)
Get a string from a HID device, based on its string index. |
java.lang.String |
getManufacturerString()
Get The Manufacturer String from a HID device. |
java.lang.String |
getProductString()
Get The Product String from a HID device. |
java.lang.String |
getSerialNumberString()
Get The Serial Number String from a HID device. |
int |
hashCode()
Returns a hash code for this HIDDevice object. |
int |
read(byte[] buf)
Read an Input Report to a HID device. |
int |
readTimeout(byte[] buf,
int milliseconds)
Read an Input report from a HID device with timeout. |
int |
sendFeatureReport(byte[] data)
Send a Feature Report to the HID device. |
int |
write(byte[] data)
Write an Output Report to a HID device. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long peer
| Constructor Detail |
|---|
protected HIDDevice(long peer)
peer - a peer value| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
HIDDevice object.
Calls the close() native method.
finalize in class java.lang.Objectjava.lang.Throwablepublic boolean equals(java.lang.Object obj)
HIDDevice object instances.
equals in class java.lang.Objectobj - HIDDevice object reference
- Returns:
true if the HIDDevice object represent the same value; false otherwisepublic int hashCode()
HIDDevice object.
hashCode in class java.lang.Object
public void close()
throws java.io.IOException
java.io.IOException - if error occured opening this device
public int write(byte[] data)
throws java.io.IOException
data - the data to send, including the report number as the first byte
java.io.IOException - if write error occured
public int read(byte[] buf)
throws java.io.IOException
buf - a buffer to put the read data into
java.io.IOException - if read error occured
public int readTimeout(byte[] buf,
int milliseconds)
buf - a buffer to put the read data into.milliseconds - a timeout in milliseconds or -1 for blocking wait.
public void enableBlocking()
throws java.io.IOException
HIDDevice object.
java.io.IOException
public void disableBlocking()
throws java.io.IOException
HIDDevice object.
java.io.IOException
public int sendFeatureReport(byte[] data)
throws java.io.IOException
data - The data to send, including the report number as the first byte
java.io.IOException
public int getFeatureReport(byte[] buf)
throws java.io.IOException
buf - a buffer to put the read data into
java.io.IOException
public java.lang.String getManufacturerString()
throws java.io.IOException
java.io.IOException
public java.lang.String getProductString()
throws java.io.IOException
java.io.IOException
public java.lang.String getSerialNumberString()
throws java.io.IOException
java.io.IOException
public java.lang.String getIndexedString(int string_index)
throws java.io.IOException
string_index - The index of the string to get.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||