Język

ISessionInputBufferExtensions.ReadAsync Method

Definition

Overloads

Name Description
ReadAsync(ISessionInputBuffer)

Runs a blocking single-byte read on a thread-pool thread.

ReadAsync(ISessionInputBuffer, Byte[])

Runs a blocking read into a byte array on a thread-pool thread.

ReadAsync(ISessionInputBuffer, Byte[], Int32, Int32)

Runs a blocking read into the specified part of a byte array on a thread-pool thread.

ReadAsync(ISessionInputBuffer)

Runs a blocking single-byte read on a thread-pool thread.

public static System.Threading.Tasks.Task<int> ReadAsync(this Org.Apache.Http.IO.ISessionInputBuffer self);
static member ReadAsync : Org.Apache.Http.IO.ISessionInputBuffer -> System.Threading.Tasks.Task<int>

Parameters

self
ISessionInputBuffer

The session input buffer from which to read.

Returns

A task whose result is the byte value from 0 through 255, or -1 if the end of the stream is reached.

Remarks

This method calls Read().

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

ReadAsync(ISessionInputBuffer, Byte[])

Runs a blocking read into a byte array on a thread-pool thread.

public static System.Threading.Tasks.Task<int> ReadAsync(this Org.Apache.Http.IO.ISessionInputBuffer self, byte[]? b);
static member ReadAsync : Org.Apache.Http.IO.ISessionInputBuffer * byte[] -> System.Threading.Tasks.Task<int>

Parameters

self
ISessionInputBuffer

The session input buffer from which to read.

b
Byte[]

The array that receives the bytes read, starting at its first element.

Returns

A task whose result is the number of bytes read, or -1 if the end of the stream is reached before data is available.

Remarks

This method calls Read(Byte[]). Keep b available for the read until the task completes.

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

ReadAsync(ISessionInputBuffer, Byte[], Int32, Int32)

Runs a blocking read into the specified part of a byte array on a thread-pool thread.

public static System.Threading.Tasks.Task<int> ReadAsync(this Org.Apache.Http.IO.ISessionInputBuffer self, byte[]? b, int off, int len);
static member ReadAsync : Org.Apache.Http.IO.ISessionInputBuffer * byte[] * int * int -> System.Threading.Tasks.Task<int>

Parameters

self
ISessionInputBuffer

The session input buffer from which to read.

b
Byte[]

The array that receives the bytes read.

off
Int32

The zero-based index in b at which to store the first byte.

len
Int32

The maximum number of bytes to read.

Returns

A task whose result is the number of bytes read, or -1 if the end of the stream is reached before data is available.

Remarks

This method calls Read(Byte[], Int32, Int32). Keep b available for the read until the task completes.

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