public class

File

extends File
java.lang.Object
   ↳ com.kinvey.java.File
     ↳ com.kinvey.nativejava.File

Class Overview

Summary

Public Methods
void deleteBlocking(FileMetaData metadata, KinveyClientCallback<KinveyDeleteResponse> callback)
Deletes the given file from the Kinvey file service.
void downloadBlocking(FileMetaData metaData, OutputStream out, DownloaderProgressListener listener)
void downloadBlocking(Query query, OutputStream out, DownloaderProgressListener listener)
Download a file by Query, only the first result will be downloaded.
void downloadMetaDataBlocking(String id, KinveyClientCallback<Void> callback)
Downloads just the metadata of a file
void downloadWithTTLBlocking(String id, int ttl, OutputStream out, DownloaderProgressListener listener)
Download a file asyncronously with a custom time to live.
void uploadBlocking(String name, InputStream inputStream, UploaderProgressListener listener)
Uploads the contents of the stream to the Kinvey file service endpoint.
void uploadBlocking(File file, UploaderProgressListener listener)
void uploadBlocking(FileMetaData meta, InputStream inputStream, UploaderProgressListener listener)
Uploads the contents of the stream to the Kinvey file service endpoint.
void uploadBlocking(FileMetaData meta, File file, UploaderProgressListener listener)
Upload a java.io.File with it's associated metadata
void uploadMetaDataBlocking(FileMetaData meta, KinveyClientCallback<Void> callback)
Upload metadata for an existing file
[Expand]
Inherited Methods
From class com.kinvey.java.File
From class java.lang.Object

Public Methods

public void deleteBlocking (FileMetaData metadata, KinveyClientCallback<KinveyDeleteResponse> callback)

Deletes the given file from the Kinvey file service.

Parameters
metadata the metadata of the file
callback an implementation of a client callback to get results on the UI thread from the async call.
Throws
IOException

public void downloadBlocking (FileMetaData metaData, OutputStream out, DownloaderProgressListener listener)

Throws
IOException

public void downloadBlocking (Query query, OutputStream out, DownloaderProgressListener listener)

Download a file by Query, only the first result will be downloaded.

Parameters
query - the query, with a limit of 1
out - where to download the file
listener - for progress notifications
Throws
IOException

public void downloadMetaDataBlocking (String id, KinveyClientCallback<Void> callback)

Downloads just the metadata of a file

Parameters
id the metadata of the file
callback an implementation of a client callback to get results on the UI thread from the async call.
Throws
IOException

public void downloadWithTTLBlocking (String id, int ttl, OutputStream out, DownloaderProgressListener listener)

Download a file asyncronously with a custom time to live.

Parameters
id - the id of the file to download
ttl - the custom ttl to use for the download URL
out - where to download the file
listener - for progress notifications
Throws
IOException

public void uploadBlocking (String name, InputStream inputStream, UploaderProgressListener listener)

Uploads the contents of the stream to the Kinvey file service endpoint.

Parameters
name name to refer to the blob when stored with the file service endpoint
inputStream stream to be uploaded
listener an implementation of a client listener to get results on the UI thread from the async call.
Throws
IOException

public void uploadBlocking (File file, UploaderProgressListener listener)

Throws
IOException

public void uploadBlocking (FileMetaData meta, InputStream inputStream, UploaderProgressListener listener)

Uploads the contents of the stream to the Kinvey file service endpoint.

Parameters
meta the metadata of the file to upload
inputStream stream to be uploaded
listener an implementation of a client listener to get results on the UI thread from the async call.
Throws
IOException

public void uploadBlocking (FileMetaData meta, File file, UploaderProgressListener listener)

Upload a java.io.File with it's associated metadata

Parameters
meta the metadata of the file to upload
file the file itself
listener listener for callbacks about upload progress
Throws
IOException

public void uploadMetaDataBlocking (FileMetaData meta, KinveyClientCallback<Void> callback)

Upload metadata for an existing file

Parameters
meta the FileMetaData to update
callback an implementation of a client callback to get results on the UI thread from the async call.
Throws
IOException