|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.jusb.UsbDescriptorImp com.ibm.jusb.UsbStringDescriptorImp
public class UsbStringDescriptorImp
UsbStringDescriptor implementation.
Field Summary | |
---|---|
static java.lang.String[] |
ENCODING
These are the encodings used to decode the USB String Descriptors. |
static java.lang.String |
ENCODING_8BIT
Fallback encoding if no 16-bit encoding is supported |
Constructor Summary | |
---|---|
UsbStringDescriptorImp(byte bLength,
byte bDescriptorType,
byte[] bString)
Constructor. |
Method Summary | |
---|---|
byte[] |
bString()
Get this descriptor's bString. |
boolean |
equals(java.lang.Object object)
Compare this to an Object. |
java.lang.String |
getString()
Get this descriptor's translated String. |
Methods inherited from class com.ibm.jusb.UsbDescriptorImp |
---|
bDescriptorType, bLength, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.usb.UsbDescriptor |
---|
bDescriptorType, bLength |
Field Detail |
---|
public static final java.lang.String[] ENCODING
For all encodings supported by Java, see:
Java 1 (1.1) Supported Encodings
Java 2 (1.3) Supported Encodings
Java 2 (1.3) Required Encodings
The translation is done using the first available of these encodings:
public static final java.lang.String ENCODING_8BIT
Constructor Detail |
---|
public UsbStringDescriptorImp(byte bLength, byte bDescriptorType, byte[] bString)
bLength
- This descriptor's bLength.bDescriptorType
- This descriptor's bDescriptorType.bString
- This descriptor's bString.Method Detail |
---|
public byte[] bString()
bString
in interface UsbStringDescriptor
public java.lang.String getString() throws java.io.UnsupportedEncodingException
This is the String translation of the bString
.
The best available 16-bit encoding is used. If no 16-bit encoding is available,
8-bit encoding is used, unless any of the characters are 16 bit (high byte is non-zero);
then 8-bit encoding is not used, and an UnsupportedEncodingException is thrown.
getString
in interface UsbStringDescriptor
java.io.UnsupportedEncodingException
- If no encodings are available.public boolean equals(java.lang.Object object)
equals
in class UsbDescriptorImp
object
- The Object to compare to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |