Class UsbPlatform

java.lang.Object
com.codename1.io.usb.UsbPlatform

public class UsbPlatform extends Object

Platform-supplied implementation of the USB host APIs. Application code talks to Usb; the facade fetches this via Display.getInstance().getUsbPlatform().

Part of the framework's service-provider interface, not intended for application use.

  • Constructor Details

    • UsbPlatform

      public UsbPlatform()
  • Method Details

    • isSupported

      public boolean isSupported()
    • listDevices

      public UsbDevice[] listDevices()
    • addDeviceListener

      public void addDeviceListener(UsbDeviceListener listener)
    • removeDeviceListener

      public void removeDeviceListener(UsbDeviceListener listener)
    • requestPermission

      public void requestPermission(UsbDevice device)
    • hasPermission

      public boolean hasPermission(UsbDevice device)
    • openInputStream

      public InputStream openInputStream(UsbDevice device, int endpointAddress) throws java.io.IOException
      Throws:
      java.io.IOException
    • openOutputStream

      public OutputStream openOutputStream(UsbDevice device, int endpointAddress) throws java.io.IOException
      Throws:
      java.io.IOException