다음을 통해 공유


BidirectionalStream.ICallback.OnReadCompleted Method

Definition

Invoked when data is read into the buffer passed to BidirectionalStream#read read().

[Android.Runtime.Register("onReadCompleted", "(Landroid/net/http/BidirectionalStream;Landroid/net/http/UrlResponseInfo;Ljava/nio/ByteBuffer;Z)V", "GetOnReadCompleted_Landroid_net_http_BidirectionalStream_Landroid_net_http_UrlResponseInfo_Ljava_nio_ByteBuffer_ZHandler:Android.Net.Http.BidirectionalStream/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public void OnReadCompleted (Android.Net.Http.BidirectionalStream stream, Android.Net.Http.UrlResponseInfo info, Java.Nio.ByteBuffer buffer, bool endOfStream);
[<Android.Runtime.Register("onReadCompleted", "(Landroid/net/http/BidirectionalStream;Landroid/net/http/UrlResponseInfo;Ljava/nio/ByteBuffer;Z)V", "GetOnReadCompleted_Landroid_net_http_BidirectionalStream_Landroid_net_http_UrlResponseInfo_Ljava_nio_ByteBuffer_ZHandler:Android.Net.Http.BidirectionalStream/ICallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member OnReadCompleted : Android.Net.Http.BidirectionalStream * Android.Net.Http.UrlResponseInfo * Java.Nio.ByteBuffer * bool -> unit

Parameters

stream
BidirectionalStream

the stream on which the read completed. <strong>This is not guaranteed to be the same object as the one received by other callbacks, nor is it guaranteed to be the one returned by BidirectionalStream.Builder#build.</strong> However, method calls on this object will have the same effects as calls on the original BidirectionalStream.

info
UrlResponseInfo

the response information

buffer
ByteBuffer

the buffer that was passed to BidirectionalStream#read read(), now set to the end of the received data. If position is not updated, it means the remote side has signaled that it will send no more data.

endOfStream
Boolean

if true, this is the last read data, remote will not send more data, and the read side is closed.

Attributes

Remarks

Invoked when data is read into the buffer passed to BidirectionalStream#read read(). Only part of the buffer may be populated. To continue reading, call BidirectionalStream#read read(). It may be invoked after onResponseTrailersReceived(), if there was pending read data before trailers were received.

Java documentation for android.net.http.BidirectionalStream.Callback.onReadCompleted(android.net.http.BidirectionalStream, android.net.http.UrlResponseInfo, java.nio.ByteBuffer, boolean).

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