private void write(ByteBuffer buffer) throws LibUsbException {
  if (mDeviceHandle != null) {
    IntBuffer transferred=IntBuffer.allocate(1);
    int result=LibUsb.interruptTransfer(mDeviceHandle,FCD_ENDPOINT_OUT,buffer,transferred,500l);
    if (result != LibUsb.SUCCESS) {
      throw new LibUsbException("error writing byte buffer",result);
    }
  }
 else {
    throw new LibUsbException("device handle is null",LibUsb.ERROR_NO_DEVICE);
  }
}

private void write ( ByteBuffer buffer ) throws LibUsbException { if ( mDeviceHandle != null ) { IntBuffer transferred = IntBuffer . allocate ( 1 ) ; int result = LibUsb . interruptTransfer ( mDeviceHandle , FCD_ENDPOINT_OUT , buffer , transferred , 500l ) ; if ( result != LibUsb . SUCCESS ) { throw new LibUsbException ( "error writing byte buffer" , result ) ; } } else { throw new LibUsbException ( "device handle is null" , LibUsb . ERROR_NO_DEVICE ) ; } }
performs an interrupt write to the out endpoint .
