API Reference

public class

NetworkFileManager

extends NetworkFileManager
java.lang.Object
   ↳ com.kinvey.java.network.NetworkFileManager
     ↳ com.kinvey.nativejava.NetworkFileManager

Class Overview

Summary

[Expand]
Inherited Fields
From class com.kinvey.java.network.NetworkFileManager
Protected Constructors
NetworkFileManager(AbstractClient client)
Base constructor requires the client instance to be passed in.
Public Methods
void deleteBlocking(FileMetaData metadata, KinveyClientCallback<KinveyDeleteResponse> callback)
Deletes the given file from the Kinvey file service.
void downloadMetaDataBlocking(String id, KinveyClientCallback<Void> callback)
Downloads just the metadata of a file
FileMetaData uploadBlocking(FileMetaData meta, File file, UploaderProgressListener listener)
Upload a java.io.NetworkFileManager with it's associated metadata
void uploadBlocking(InputStream inputStream, UploaderProgressListener listener)
Uploads the contents of the stream to the Kinvey file service endpoint, automatically generating a new unique _id and with no metatdata.
void uploadBlocking(String name, InputStream inputStream, UploaderProgressListener listener)
Uploads the contents of the stream to the Kinvey file service endpoint.
void uploadBlocking(FileMetaData meta, InputStream inputStream, UploaderProgressListener listener)
Uploads the contents of the stream to the Kinvey file service endpoint.
void uploadBlocking(File file, UploaderProgressListener listener)
void uploadMetaDataBlocking(FileMetaData meta, KinveyClientCallback<Void> callback)
Upload metadata for an existing file
[Expand]
Inherited Methods
From class com.kinvey.java.network.NetworkFileManager
From class java.lang.Object

Protected Constructors

protected NetworkFileManager (AbstractClient client)

Base constructor requires the client instance to be passed in.

initializeRequest(com.kinvey.java.core.AbstractKinveyClientRequest) is used to initialize all requests constructed by this api.

Parameters
client required instance
Throws
NullPointerException if the client parameter is non-null

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 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 FileMetaData uploadBlocking (FileMetaData meta, File file, UploaderProgressListener listener)

Upload a java.io.NetworkFileManager 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 uploadBlocking (InputStream inputStream, UploaderProgressListener listener)

Uploads the contents of the stream to the Kinvey file service endpoint, automatically generating a new unique _id and with no metatdata.

Parameters
inputStream stream to upload
listener an implementation of a client listener to get results on the UI thread from the async call.
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 (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 (File file, UploaderProgressListener listener)

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