public class GetSharedLinkFileBuilder extends DbxDownloadStyleBuilder<SharedLinkMetadata>
DbxUserSharingRequests.getSharedLinkFileBuilder(java.lang.String)
.
Use this class to set optional request parameters and complete the request.
Modifier and Type | Method and Description |
---|---|
DbxDownloader<SharedLinkMetadata> |
start()
Issues the download request using this builder's request parameters and returns a
DbxDownloader for reading the response body. |
GetSharedLinkFileBuilder |
withLinkPassword(String linkPassword)
Set value for optional field.
|
GetSharedLinkFileBuilder |
withPath(String path)
Set value for optional field.
|
download, getHeaders, range, range
public GetSharedLinkFileBuilder withPath(String path)
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])*
".IllegalArgumentException
- If any argument does not meet its
preconditions.public GetSharedLinkFileBuilder withLinkPassword(String linkPassword)
linkPassword
- If the shared link has a password, this parameter
can be used.public DbxDownloader<SharedLinkMetadata> start() throws GetSharedLinkFileErrorException, 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<SharedLinkMetadata>
DbxDownloader
used to download data and read the response.DbxException
- if an error occursing issuing the requestGetSharedLinkFileErrorException