Package com.dropbox.core.v2.files
Class DbxUserGetThumbnailV2Builder
- java.lang.Object
- 
- com.dropbox.core.v2.DbxDownloadStyleBuilder<PreviewResult>
- 
- com.dropbox.core.v2.files.DbxUserGetThumbnailV2Builder
 
 
- 
 public class DbxUserGetThumbnailV2Builder extends DbxDownloadStyleBuilder<PreviewResult> The request builder returned byDbxUserFilesRequests.getThumbnailV2Builder(com.dropbox.core.v2.files.PathOrLink).Use this class to set optional request parameters and complete the request. 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DbxDownloader<PreviewResult>start()Issues the download request using this builder's request parameters and returns aDbxDownloaderfor reading the response body.DbxUserGetThumbnailV2BuilderwithFormat(ThumbnailFormat format)Set value for optional field.DbxUserGetThumbnailV2BuilderwithMode(ThumbnailMode mode)Set value for optional field.DbxUserGetThumbnailV2BuilderwithSize(ThumbnailSize size)Set value for optional field.- 
Methods inherited from class com.dropbox.core.v2.DbxDownloadStyleBuilderdownload, getHeaders, range, range
 
- 
 
- 
- 
- 
Method Detail- 
withFormatpublic DbxUserGetThumbnailV2Builder withFormat(ThumbnailFormat format) Set value for optional field.If left unset or set to null, defaults toThumbnailFormat.JPEG.- Parameters:
- format- The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts. Must not be- null. Defaults to- ThumbnailFormat.JPEGwhen set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withSizepublic DbxUserGetThumbnailV2Builder withSize(ThumbnailSize size) Set value for optional field.If left unset or set to null, defaults toThumbnailSize.W64H64.- Parameters:
- size- The size for the thumbnail image. Must not be- null. Defaults to- ThumbnailSize.W64H64when set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
withModepublic DbxUserGetThumbnailV2Builder withMode(ThumbnailMode mode) Set value for optional field.If left unset or set to null, defaults toThumbnailMode.STRICT.- Parameters:
- mode- How to resize and crop the image to achieve the desired size. Must not be- null. Defaults to- ThumbnailMode.STRICTwhen set to- null.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
startpublic DbxDownloader<PreviewResult> start() throws ThumbnailV2ErrorException, DbxException 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 class- DbxDownloadStyleBuilder<PreviewResult>
- Returns:
- DbxDownloaderused to download data and read the response.
- Throws:
- DbxException- if an error occursing issuing the request
- ThumbnailV2ErrorException
 
 
- 
 
-