FileDocCategorySizeDatePackage
USBLister.javaAPI DocExample614Thu Feb 16 08:09:38 GMT 2006None

USBLister

public class USBLister extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidlistDevices(UsbHub hub)

    List devices = hub.getAttachedUsbDevices();
    Iterator iterator = devices.iterator();
    while (iterator.hasNext()) {
      UsbDevice device = (UsbDevice) iterator.next();
      System.out.println(device);
      if (device.isUsbHub()) {
        listDevices((UsbHub) device);
      }
    } 
  
public static voidmain(java.lang.String[] args)

    UsbServices services = UsbHostManager.getUsbServices();
    UsbHub root = services.getRootUsbHub();
    listDevices(root);