# 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 Summary

  Constructors
  Constructor
  Description
  `UsbPlatform()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addDeviceListener(UsbDeviceListener listener)`
  `boolean`
  `hasPermission(UsbDevice device)`
  `boolean`
  `isSupported()`
  `UsbDevice[]`
  `listDevices()`
  `InputStream`
  `openInputStream(UsbDevice device, int endpointAddress)`
  `OutputStream`
  `openOutputStream(UsbDevice device, int endpointAddress)`
  `void`
  `removeDeviceListener(UsbDeviceListener listener)`
  `void`
  `requestPermission(UsbDevice device)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`