|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UsbStringDescriptor
Interface for a USB string descriptor.
Method Summary | |
---|---|
byte[] |
bString()
Get this descriptor's bString. |
java.lang.String |
getString()
Get this descriptor's translated String. |
Methods inherited from interface javax.usb.UsbDescriptor |
---|
bDescriptorType, bLength |
Method Detail |
---|
byte[] bString()
Modifications to the returned byte[] will not affect the StringDescriptor's bString (i.e. a copy of the bString is returned).
java.lang.String getString() throws java.io.UnsupportedEncodingException
This is the String translation of the bString
.
The translation is done using the best available Unicode encoding that this
JVM provides. USB strings are 16-bit little-endian; if no 16-bit little-endian
encoding is available, and the string can be converted to 8-bit (all high bytes are zero),
then 8-bit encoding is used. If no encoding is available,
an UnsupportedEncodingException is thrown.
For information about Unicode see the Unicode website.
java.io.UnsupportedEncodingException
- If no encoding is available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |