HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Method ReadAsync

    ReadAsync(long, Memory<byte>, CancellationToken)

    Reads bytes of the content, starting at the specified offset, into the buffer.

    Declaration
    public abstract ValueTask<int> ReadAsync(long offset, Memory<byte> buffer, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    long offset

    The offset in the content of the first byte to read.

    Memory<byte> buffer

    The buffer to read into. An upload never reads past Length.

    CancellationToken cancellationToken

    A token to cancel the read.

    Returns
    Type Description
    ValueTask<int>

    The number of bytes read, which can be less than the length of the buffer. Zero means that the content ends at the offset.

    Remarks

    The same range can be read more than once. An exception that the read throws ends the upload, which aborts the upload on the service and throws it.

    © Singulink. All rights reserved.