public class ZipDownloadsManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZipDownloadsManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
ZipDownloadsManager() |
protected |
ZipDownloadsManager(ZipDownloadsManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
ZipDownload |
createZipDownload(ZipDownloadRequest requestBody)
Creates a request to download multiple files and folders as a single `zip` archive file.
|
ZipDownload |
createZipDownload(ZipDownloadRequest requestBody,
CreateZipDownloadHeaders headers)
Creates a request to download multiple files and folders as a single `zip` archive file.
|
InputStream |
downloadZip(ZipDownloadRequest requestBody)
Creates a zip and downloads its content
|
InputStream |
downloadZip(ZipDownloadRequest requestBody,
DownloadZipHeaders headers)
Creates a zip and downloads its content
|
Authentication |
getAuth() |
NetworkSession |
getNetworkSession() |
InputStream |
getZipDownloadContent(String downloadUrl)
Returns the contents of a `zip` archive in binary format.
|
InputStream |
getZipDownloadContent(String downloadUrl,
GetZipDownloadContentHeaders headers)
Returns the contents of a `zip` archive in binary format.
|
ZipDownloadStatus |
getZipDownloadStatus(String statusUrl)
Returns the download status of a `zip` archive, allowing an application to inspect the progress
of the download as well as the number of items that might have been skipped.
|
ZipDownloadStatus |
getZipDownloadStatus(String statusUrl,
GetZipDownloadStatusHeaders headers)
Returns the download status of a `zip` archive, allowing an application to inspect the progress
of the download as well as the number of items that might have been skipped.
|
public Authentication auth
public NetworkSession networkSession
public ZipDownloadsManager()
protected ZipDownloadsManager(ZipDownloadsManager.Builder builder)
public ZipDownload createZipDownload(ZipDownloadRequest requestBody)
The limit for an archive is either the Account's upload limit or 10,000 files, whichever is met first.
**Note**: Downloading a large file can be affected by various factors such as distance, network latency, bandwidth, and congestion, as well as packet loss ratio and current server load. For these reasons we recommend that a maximum ZIP archive total size does not exceed 25GB.
requestBody - Request body of createZipDownload methodpublic ZipDownload createZipDownload(ZipDownloadRequest requestBody, CreateZipDownloadHeaders headers)
The limit for an archive is either the Account's upload limit or 10,000 files, whichever is met first.
**Note**: Downloading a large file can be affected by various factors such as distance, network latency, bandwidth, and congestion, as well as packet loss ratio and current server load. For these reasons we recommend that a maximum ZIP archive total size does not exceed 25GB.
requestBody - Request body of createZipDownload methodheaders - Headers of createZipDownload methodpublic InputStream getZipDownloadContent(String downloadUrl)
By default, this URL is only valid for a few seconds from the creation of the request for this archive. Once a download has started it can not be stopped and resumed, instead a new request for a zip archive would need to be created.
The URL of this endpoint should not be considered as fixed. Instead, use the [Create zip download](https://developer.box.com/reference/post-zip-downloads) API to request to create a `zip` archive, and then follow the `download_url` field in the response to this endpoint.
downloadUrl - The URL that can be used to download created `zip` archive. Example:
`https://dl.boxcloud.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/content`public InputStream getZipDownloadContent(String downloadUrl, GetZipDownloadContentHeaders headers)
By default, this URL is only valid for a few seconds from the creation of the request for this archive. Once a download has started it can not be stopped and resumed, instead a new request for a zip archive would need to be created.
The URL of this endpoint should not be considered as fixed. Instead, use the [Create zip download](https://developer.box.com/reference/post-zip-downloads) API to request to create a `zip` archive, and then follow the `download_url` field in the response to this endpoint.
downloadUrl - The URL that can be used to download created `zip` archive. Example:
`https://dl.boxcloud.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/content`headers - Headers of getZipDownloadContent methodpublic ZipDownloadStatus getZipDownloadStatus(String statusUrl)
This endpoint can only be accessed once the download has started. Subsequently this endpoint is valid for 12 hours from the start of the download.
The URL of this endpoint should not be considered as fixed. Instead, use the [Create zip download](https://developer.box.com/reference/post-zip-downloads) API to request to create a `zip` archive, and then follow the `status_url` field in the response to this endpoint.
statusUrl - The URL that can be used to get the status of the `zip` archive being
downloaded. Example:
`https://dl.boxcloud.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/status`public ZipDownloadStatus getZipDownloadStatus(String statusUrl, GetZipDownloadStatusHeaders headers)
This endpoint can only be accessed once the download has started. Subsequently this endpoint is valid for 12 hours from the start of the download.
The URL of this endpoint should not be considered as fixed. Instead, use the [Create zip download](https://developer.box.com/reference/post-zip-downloads) API to request to create a `zip` archive, and then follow the `status_url` field in the response to this endpoint.
statusUrl - The URL that can be used to get the status of the `zip` archive being
downloaded. Example:
`https://dl.boxcloud.com/2.0/zip_downloads/29l00nfxDyHOt7RphI9zT_w==nDnZEDjY2S8iEWWCHEEiptFxwoWojjlibZjJ6geuE5xnXENDTPxzgbks_yY=/status`headers - Headers of getZipDownloadStatus methodpublic InputStream downloadZip(ZipDownloadRequest requestBody)
requestBody - Zip download request bodypublic InputStream downloadZip(ZipDownloadRequest requestBody, DownloadZipHeaders headers)
requestBody - Zip download request bodyheaders - Headers of zip download methodpublic Authentication getAuth()
public NetworkSession getNetworkSession()