Code example for UsbDeviceConnection

Methods: bulkTransfer

0
		if ((null == mUsbEndpointOut) || (null == mUsbDeviceConnection)
				|| (null == buffer))
			return -1; 
		if (length <= 0 || length > buffer.length)
			return -1; 
		return mUsbDeviceConnection.bulkTransfer(mUsbEndpointOut, buffer,
				length, timeOut);
	} 
 
	public int read(byte[] buffer, int length) {
		if ((null == mUsbEndpointIn) || (null == mUsbDeviceConnection)
				|| (null == buffer))
			return -1; 
 
		if (length <= 0 || length > buffer.length)
			return -1; 
		return mUsbDeviceConnection.bulkTransfer(mUsbEndpointIn, buffer,
				length, timeOut);
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE