public class UsbStringDescriptorImp extends UsbDescriptorImp implements UsbStringDescriptor
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ENCODING
These are the encodings used to decode the USB String Descriptors.
|
static String |
ENCODING_8BIT
Fallback encoding if no 16-bit encoding is supported
|
| Constructor and Description |
|---|
UsbStringDescriptorImp(byte bLength,
byte bDescriptorType,
byte[] bString)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bString()
Get this descriptor's bString.
|
boolean |
equals(Object object)
Compare this to an Object.
|
String |
getString()
Get this descriptor's translated String.
|
bDescriptorType, bLength, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitbDescriptorType, bLengthpublic static final 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 String ENCODING_8BIT
public UsbStringDescriptorImp(byte bLength,
byte bDescriptorType,
byte[] bString)
bLength - This descriptor's bLength.bDescriptorType - This descriptor's bDescriptorType.bString - This descriptor's bString.public byte[] bString()
bString in interface UsbStringDescriptorpublic String getString() throws UsbEncodingException
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 UsbEncodingException is thrown.
getString in interface UsbStringDescriptorUsbEncodingException - If no encodings are available.public boolean equals(Object object)
equals in class UsbDescriptorImpobject - The Object to compare to.Copyright © 2014 LSST. All Rights Reserved.