Modifier and Type | Field and Description |
---|---|
static URLTemplate |
ZIP_URL_TEMPLATE
Zip URL Template.
|
Constructor and Description |
---|
BoxZip(BoxAPIConnection api)
Constructs a Zip to be used by everything.
|
Modifier and Type | Method and Description |
---|---|
BoxZipInfo |
create(String name,
List<BoxZipItem> items)
Creates a zip of multiple files and folders.
|
BoxZipDownloadStatus |
download(String name,
List<BoxZipItem> items,
OutputStream output)
Creates a zip and downloads it to a given OutputStream.
|
BoxZipDownloadStatus |
download(String name,
List<BoxZipItem> items,
OutputStream output,
ProgressListener listener)
Creates a zip and downloads its contents its to a given OutputStream.
|
BoxAPIConnection |
getAPI()
Gets the API connection used by this resource.
|
public static final URLTemplate ZIP_URL_TEMPLATE
public BoxZip(BoxAPIConnection api)
api
- the API connection to be used by the Zip.public BoxZipInfo create(String name, List<BoxZipItem> items)
name
- the name of the zip file to be createditems
- list of files or folders to be part of the created zippublic BoxZipDownloadStatus download(String name, List<BoxZipItem> items, OutputStream output)
name
- the name of the zip file to be createditems
- list of files or folders to be part of the created zipoutput
- the stream to where the zip file will be written.public BoxZipDownloadStatus download(String name, List<BoxZipItem> items, OutputStream output, ProgressListener listener)
name
- the name of the zip file to be createditems
- list of files or folders to be part of the created zipoutput
- the stream to where the zip file will be written.listener
- a listener for monitoring the download's progress.public BoxAPIConnection getAPI()