Package com.dropbox.core.v2.sharing
Class GetSharedLinkFileBuilder
- java.lang.Object
-
- com.dropbox.core.v2.DbxDownloadStyleBuilder<SharedLinkMetadata>
-
- com.dropbox.core.v2.sharing.GetSharedLinkFileBuilder
-
public class GetSharedLinkFileBuilder extends DbxDownloadStyleBuilder<SharedLinkMetadata>
The request builder returned byDbxUserSharingRequests.getSharedLinkFileBuilder(java.lang.String)
.Use this class to set optional request parameters and complete the request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DbxDownloader<SharedLinkMetadata>
start()
Issues the download request using this builder's request parameters and returns aDbxDownloader
for reading the response body.GetSharedLinkFileBuilder
withLinkPassword(java.lang.String linkPassword)
Set value for optional field.GetSharedLinkFileBuilder
withPath(java.lang.String path)
Set value for optional field.-
Methods inherited from class com.dropbox.core.v2.DbxDownloadStyleBuilder
download, getHeaders, range, range
-
-
-
-
Method Detail
-
withPath
public GetSharedLinkFileBuilder withPath(java.lang.String path)
Set value for optional field.- Parameters:
path
- If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used. Must match pattern "/(.|[\\r\\n])*
".- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withLinkPassword
public GetSharedLinkFileBuilder withLinkPassword(java.lang.String linkPassword)
Set value for optional field.- Parameters:
linkPassword
- If the shared link has a password, this parameter can be used.- Returns:
- this builder
-
start
public DbxDownloader<SharedLinkMetadata> start() throws GetSharedLinkFileErrorException, DbxException
Description copied from class:DbxDownloadStyleBuilder
Issues the download request using this builder's request parameters and returns aDbxDownloader
for 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:
start
in classDbxDownloadStyleBuilder<SharedLinkMetadata>
- Returns:
DbxDownloader
used to download data and read the response.- Throws:
DbxException
- if an error occursing issuing the requestGetSharedLinkFileErrorException
-
-