UrlRequest.Read(ByteBuffer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to read part of the response body into the provided buffer.
[Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;)V", "GetRead_Ljava_nio_ByteBuffer_Handler", ApiSince=34)]
public abstract void Read (Java.Nio.ByteBuffer buffer);
[<Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;)V", "GetRead_Ljava_nio_ByteBuffer_Handler", ApiSince=34)>]
abstract member Read : Java.Nio.ByteBuffer -> unit
Parameters
- buffer
- ByteBuffer
ByteBuffer
to write response body to. Must be a direct ByteBuffer. The
embedder must not read or modify buffer's position, limit, or data between its position and
limit until the request calls back into the Callback
.
- Attributes
Remarks
Attempts to read part of the response body into the provided buffer. Must only be called at most once in response to each invocation of the Callback#onResponseStarted onResponseStarted()
and Callback#onReadCompleted onReadCompleted()
methods of the Callback
. Each call will result in an asynchronous call to either the Callback Callback's
Callback#onReadCompleted onReadCompleted()
method if data is read, its Callback#onSucceeded onSucceeded()
method if there's no more data to read, or its Callback#onFailed onFailed()
method if there's an error.
Java documentation for android.net.http.UrlRequest.read(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.