public interface UsbStringDescriptor extends UsbDescriptor
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bString()
Get this descriptor's bString.
|
java.lang.String |
getString()
Get this descriptor's translated String.
|
bDescriptorType, bLengthbyte[] 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.