How can I determine the length of received bytes of UsbRequest.queue(..) method?
问题 I have troubles with UsbRequest class in Android 3.1. This is my code: ByteBuffer buffer = ByteBuffer.allocate(4096); buffer.order(ByteOrder.LITTLE_ENDIAN); UsbRequest request = new UsbRequest(); request.initialize(mConnection, mEndpointIn); request.queue(buffer, 4096); if (mConnection.requestWait() == request) { byte[] data = buffer.array(); } The size of array data is 4096, but the length of really received bytes is much more smaller. How can i determine the size of really received bytes?