UsbRequest.Queue Method

Definition

Overloads

Queue(ByteBuffer)

Queues the request to send or receive data on its endpoint.

Queue(ByteBuffer, Int32)
Obsolete.

Queues the request to send or receive data on its endpoint.

Queue(ByteBuffer)

Queues the request to send or receive data on its endpoint.

[Android.Runtime.Register("queue", "(Ljava/nio/ByteBuffer;)Z", "GetQueue_Ljava_nio_ByteBuffer_Handler", ApiSince=26)]
public virtual bool Queue (Java.Nio.ByteBuffer? buffer);
[<Android.Runtime.Register("queue", "(Ljava/nio/ByteBuffer;)Z", "GetQueue_Ljava_nio_ByteBuffer_Handler", ApiSince=26)>]
abstract member Queue : Java.Nio.ByteBuffer -> bool
override this.Queue : Java.Nio.ByteBuffer -> bool

Parameters

buffer
ByteBuffer

the buffer containing the bytes to send, or the buffer to fill. The state of the buffer is undefined until the request is returned by UsbDeviceConnection#requestWait. If the request failed the buffer will be unchanged; if the request succeeded the position of the buffer is incremented by the number of bytes sent/received. Before [TODO: @value for Build.VERSION_CODES#P], a buffer of length larger than 16384 bytes would throw IllegalArgumentException. In API [TODO: @value for Build.VERSION_CODES#P] and after, any size buffer is valid.

Returns

Boolean

true if the queueing operation succeeded

Attributes

Remarks

Java documentation for android.hardware.usb.UsbRequest.queue(java.nio.ByteBuffer).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Queue(ByteBuffer, Int32)

Caution

deprecated

Queues the request to send or receive data on its endpoint.

[Android.Runtime.Register("queue", "(Ljava/nio/ByteBuffer;I)Z", "GetQueue_Ljava_nio_ByteBuffer_IHandler")]
[System.Obsolete("deprecated")]
public virtual bool Queue (Java.Nio.ByteBuffer? buffer, int length);
[<Android.Runtime.Register("queue", "(Ljava/nio/ByteBuffer;I)Z", "GetQueue_Ljava_nio_ByteBuffer_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member Queue : Java.Nio.ByteBuffer * int -> bool
override this.Queue : Java.Nio.ByteBuffer * int -> bool

Parameters

buffer
ByteBuffer

the buffer containing the bytes to write, or location to store the results of a read. Position and array offset will be ignored and assumed to be 0. Limit and capacity will be ignored. Once the request UsbDeviceConnection#requestWait() is processed the position will be set to the number of bytes read/written.

length
Int32

number of bytes to read or write. Before [TODO: @value for Build.VERSION_CODES#P], a value larger than 16384 bytes would be truncated down to 16384. In API [TODO: @value for Build.VERSION_CODES#P] and after, any value of length is valid.

Returns

Boolean

true if the queueing operation succeeded

Attributes

Remarks

Java documentation for android.hardware.usb.UsbRequest.queue(java.nio.ByteBuffer, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to