public class DownloadBuilder extends DbxDownloadStyleBuilder<FileMetadata>
DbxUserFilesRequests.downloadBuilder(java.lang.String)
.
Use this class to set optional request parameters and complete the request.
Modifier and Type | Method and Description |
---|---|
DbxDownloader<FileMetadata> |
start()
Issues the download request using this builder's request parameters and returns a
DbxDownloader for reading the response body. |
DownloadBuilder |
withRev(java.lang.String rev)
Set value for optional field.
|
download, getHeaders, range, range
public DownloadBuilder withRev(java.lang.String rev)
rev
- Please specify revision in the path
argument to
DbxUserFilesRequests.download(String,String)
instead. Must
have length of at least 9 and match pattern "[0-9a-f]+
".java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public DbxDownloader<FileMetadata> start() throws DownloadErrorException, DbxException
DbxDownloadStyleBuilder
DbxDownloader
for reading the response body.
Callers should fully read the response body using DbxDownloader.getInputStream()
and
close the downloader afterwards (see DbxDownloader.close()
). This will allow for proper
resource deallocation and connection re-use..
See DbxDownloadStyleBuilder.download(java.io.OutputStream)
convenience method for a simpler way to complete the request.start
in class DbxDownloadStyleBuilder<FileMetadata>
DbxDownloader
used to download data and read the response.DbxException
- if an error occursing issuing the requestDownloadErrorException