java.lang.Object | |
↳ | com.kinvey.java.File |
Wraps the File
public methods in asynchronous functionality using native Android AsyncTask.
This class is constructed via file()
factory method.
The callback mechanism for this api is extended to include the progressChanged(com.kinvey.java.core.MediaHttpUploader)
method, which receives notifications as the upload process transitions through and progresses with the upload.
process.
Sample usage:
mKinveyClient.file().uploadBlocking(file, new UploaderProgressListener() {
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | File.Delete | Initiate a delete of a particular file already known to Kinvey. | |||||||||
class | File.Download | Initiate a download of a particular file already known to Kinvey. | |||||||||
class | File.GetDownloadUrl | GET a temporary url for download. | |||||||||
class | File.GetUploadUrl | GET a temporary url for uploading file contents. | |||||||||
class | File.Upload | Initiate an upload of a particular file and its contents. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
File.Delete |
delete(String filename)
This method is deprecated.
Rename to
deleteBlocking(String)
| ||||||||||
File.Delete |
deleteBlocking(String filename)
Deletes the given file from the Kinvey file service.
| ||||||||||
File.Download |
download(String filename)
This method is deprecated.
Renamed to
downloadBlocking(String)
| ||||||||||
File.Download |
downloadBlocking(String filename)
Download a given file from the Kinvey file service.
| ||||||||||
File.GetDownloadUrl |
getDownloadUrl(String fileName)
This method is deprecated.
Renamed to
getDownloadUrlBlocking(String)
| ||||||||||
File.GetDownloadUrl |
getDownloadUrlBlocking(String fileName)
Constructs a request to retrieve a temporary url for purposes of downloading a given file already known to Kinvey.
| ||||||||||
File.GetUploadUrl |
getUploadUrl(String fileName)
This method is deprecated.
Renamed to
getUploadUrlBlocking(String)
| ||||||||||
File.GetUploadUrl |
getUploadUrlBlocking(String fileName)
Constructs a request to retrieve a temporary url for purposes of uploading a given file.
| ||||||||||
void | setDownloaderProgressListener(DownloaderProgressListener downloaderProgressListener) | ||||||||||
void | setUploadProgressListener(UploaderProgressListener uploadProgressListener) | ||||||||||
File.Upload |
upload(String fileName, AbstractInputStreamContent content)
This method is deprecated.
Renamed to
uploadBlocking(String, com.google.api.client.http.AbstractInputStreamContent)
| ||||||||||
File.Upload |
uploadBlocking(String fileName, AbstractInputStreamContent content)
Uploads a given file and its contents to the Kinvey file service.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
Rename to deleteBlocking(String)
Deletes the given file from the Kinvey file service.
filename | the name of used in metadata to refer to the file |
---|
IOException | |
IOException |
Deletes the given file from the Kinvey file service.
filename | the name of used in metadata to refer to the file |
---|
IOException |
---|
This method is deprecated.
Renamed to downloadBlocking(String)
Download a given file from the Kinvey file service.
filename | the name used in metadata for downloadable file. |
---|
IOException | |
IOException |
Download a given file from the Kinvey file service.
filename | the name used in metadata for downloadable file. |
---|
IOException |
---|
This method is deprecated.
Renamed to getDownloadUrlBlocking(String)
Constructs a request to retrieve a temporary url for purposes of downloading a given file already known to Kinvey.
The url expires within 30 secs. of calling execute()
.
fileName | name of the file for which kinvey service is aware |
---|
IOException | if initializing the request fails |
---|
Constructs a request to retrieve a temporary url for purposes of downloading a given file already known to Kinvey.
The url expires within 30 secs. of calling execute()
.
fileName | name of the file for which kinvey service is aware |
---|
IOException | if initializing the request fails |
---|
This method is deprecated.
Renamed to getUploadUrlBlocking(String)
Constructs a request to retrieve a temporary url for purposes of uploading a given file.
The url expires within 30 secs. of calling execute()
.
fileName | the name of the file used in metadata |
---|
IOException | if initializing the request fails |
---|
Constructs a request to retrieve a temporary url for purposes of uploading a given file.
The url expires within 30 secs. of calling execute()
.
fileName | the name of the file used in metadata |
---|
IOException | if initializing the request fails |
---|
downloaderProgressListener | the listener to receive notifications as the download progresses |
---|
uploadProgressListener | the listener to receive notifications as the upload progresses |
---|
This method is deprecated.
Renamed to uploadBlocking(String, com.google.api.client.http.AbstractInputStreamContent)
Uploads a given file and its contents to the Kinvey file service.
fileName | the filename used for the metadata |
---|---|
content | the input stream from which the file contents will be sourced |
IOException | if initializing the request fails |
---|
Uploads a given file and its contents to the Kinvey file service.
fileName | the filename used for the metadata |
---|---|
content | the input stream from which the file contents will be sourced |
IOException | if initializing the request fails |
---|