public final class SimpleUsbStringDescriptor extends SimpleUsbDescriptor implements javax.usb.UsbStringDescriptor
Constructor and Description |
---|
SimpleUsbStringDescriptor(ByteBuffer data)
Constructs a new string descriptor by reading the descriptor data
from the specified byte buffer.
|
SimpleUsbStringDescriptor(byte bLength,
byte bDescriptorType,
String string)
Constructs a new string descriptor with the specified data.
|
SimpleUsbStringDescriptor(javax.usb.UsbStringDescriptor descriptor)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
bString() |
boolean |
equals(Object obj) |
String |
getString() |
int |
hashCode() |
String |
toString() |
bDescriptorType, bLength
public SimpleUsbStringDescriptor(ByteBuffer data)
data
- The descriptor data as a byte buffer.public SimpleUsbStringDescriptor(byte bLength, byte bDescriptorType, String string) throws UnsupportedEncodingException
bLength
- The descriptor length.bDescriptorType
- The descriptor type.string
- The string.UnsupportedEncodingException
- When system does not support UTF-16LE encoding.public SimpleUsbStringDescriptor(javax.usb.UsbStringDescriptor descriptor)
descriptor
- The descriptor from which to copy the data.public byte[] bString()
bString
in interface javax.usb.UsbStringDescriptor
public String getString() throws UnsupportedEncodingException
getString
in interface javax.usb.UsbStringDescriptor
UnsupportedEncodingException
Copyright © 2011–2018 usb4java Team. All rights reserved.