All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.mobileconnectors.s3.transferutility.package-info Maven / Gradle / Ivy

There is a newer version: 2.9.1
Show newest version
/**
 * This package contains helper classes for managing upload and download tasks and a public
 * class {@link com.amazonaws.mobileconnectors.s3.transferservice.transferUtility}
 * which is a high level client that provides methods to control users' upload and download tasks.
 *
 * For starting transfer tasks, here is a sample usage.
 *
 * 
 * // Initializes TransferUtility
 * TransferUtility transferUtility = new TransferUtility(s3, getApplicationContext());
 * // Starts a download
 * TransferObserver observer = transferUtility.download("bucket_name", "key", file);
 * observer.setTransferListener(new TransferListener() {
 *     public void onStateChanged(int id, String newState) {
 *         // Do something in the callback.
 *     }
 *
 *     public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) {
 *         // Do something in the callback.
 *     }
 *
 *     public void onError(int id, Exception e) {
 *         // Do something in the callback.
 *     }
 * });
 * 
* * For pausing and resuming tasks: * *
 * // Gets id of the transfer.
 * int id = observer.getId();
 *
 * // Pauses the transfer.
 * transferUtility.pause(id);
 *
 * // Resumes the transfer.
 * transferUtility.resume(id);
 * 
* * For cancelling and deleting tasks: * *
 * // Cancels the transfer.
 * transferUtility.cancel(id);
 *
 * // Deletes the transfer.
 * transferUtility.delete(id);
 * 
*/ package com.amazonaws.mobileconnectors.s3.transferutility;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy