Package com.dropbox.core.v2.files
Class GetPreviewBuilder
java.lang.Object
com.dropbox.core.v2.DbxDownloadStyleBuilder<FileMetadata>
com.dropbox.core.v2.files.GetPreviewBuilder
The request builder returned by
DbxUserFilesRequests.getPreviewBuilder(java.lang.String).
Use this class to set optional request parameters and complete the request.
-
Method Summary
Modifier and TypeMethodDescriptionstart()Issues the download request using this builder's request parameters and returns aDbxDownloaderfor reading the response body.Deprecated.Methods inherited from class com.dropbox.core.v2.DbxDownloadStyleBuilder
download, getHeaders, range, range
-
Method Details
-
withRev
Deprecated.Set value for optional field.- Parameters:
rev- Field is deprecated. Please specify revision in thepathargument toDbxUserFilesRequests.getPreview(String,String)instead. Must have length of at least 9 and match pattern "[0-9a-f]+".- Returns:
- this builder
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
start
Description copied from class:DbxDownloadStyleBuilderIssues the download request using this builder's request parameters and returns aDbxDownloaderfor reading the response body. Callers should fully read the response body usingDbxDownloader.getInputStream()and close the downloader afterwards (seeDbxDownloader.close()). This will allow for proper resource deallocation and connection re-use.. SeeDbxDownloadStyleBuilder.download(java.io.OutputStream)convenience method for a simpler way to complete the request.- Specified by:
startin classDbxDownloadStyleBuilder<FileMetadata>- Returns:
DbxDownloaderused to download data and read the response.- Throws:
DbxException- if an error occursing issuing the requestPreviewErrorException
-