Code example for UsbDeviceConnection

Methods: bulkTransfer

0
    @Override 
    protected void ioWrite(byte[] buffer, int offset, int count) throws IOException {
        if (mConnection == null) {
            throw new IOException("Connection was closed.");
        } 
        int result = mConnection.bulkTransfer(mBulkOutEndpoint,
                buffer, offset, count, TIMEOUT_MILLIS);
        if (result < 0) {
            throw new IOException("Bulk transfer failed.");
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java