DownloadResponse Class

Definition

DownloadResponse 

</code> wraps the protocol-layer response from <xref uid="" data-throw-if-not-resolved="false">BlobAccessConditions, boolean, com.microsoft.rest.v2.Context)</xref> to automatically retry failed reads from the body as appropriate. If the download is interrupted, the<code>DownloadResponse 

</code> will make a request to resume the download from where it left off, allowing the user to consume the data as one continuous stream, for any interruptions are hidden. The retry behavior is defined by the options passed to the <xref uid="com.microsoft.azure.storage.blob._download_response.body(ReliableDownloadOptions)" data-throw-if-not-resolved="false">body(ReliableDownloadOptions)</xref>. The download will also lock on the blob's etag to ensure consistency. </p>

Note that the retries performed as a part of this reader are composed with those of any retries in an HttpPipeline used in conjunction with this reader. That is, if this object issues a request to resume a download, an underlying pipeline may issue several retries as a part of that request. Furthermore, this reader only retries on network errors; timeouts and unexpected status codes are not retried. Therefore, the behavior of this reader is entirely independent of and in no way coupled to an HttpPipeline's retry mechanism.

public class DownloadResponse
Inheritance
java.lang.Object
DownloadResponse

Constructors

DownloadResponse(RestResponse<BlobDownloadHeaders, Flowable<ByteBuffer>> response, HTTPGetterInfo info, Function<HTTPGetterInfo, Single<DownloadResponse>> getter)

Methods

body(ReliableDownloadOptions options)

Returns the response body which has been modified to enable reliably reading data if desired (if options.maxRetryRequests > 0 

</code> . If retries are enabled, if a connection fails while reading, the stream will make additional requests to reestablish a connection and continue reading.</p>

headers()
rawHeaders()
rawResponse()
statusCode()

Applies to