code: public static int productFromUri(URI uri)
              throws DataSourceResourceException {
          try {
              return Integer.parseInt(uri.getPath().substring(1), 16);
          } catch(NumberFormatException e) {
              throw new DataSourceResourceException(
                  "USB device must be of the format " + DEFAULT_USB_DEVICE_URI +
                  " -- the given " + uri + " has a bad product ID");
          } catch(StringIndexOutOfBoundsException e) {
              throw new DataSourceResourceException(
                  "USB device must be of the format " + DEFAULT_USB_DEVICE_URI +
                  " -- the given " + uri + " has a bad product ID");
          }
      }
docs: Return an integer product ID from a URI specifying a USB device.
  
  @param uri the USB device URI
  @throws DataSourceResourceException If the URI doesn't match the
  format usb://vendor_id/device_id