public class

MediaOfflineDownloader

extends MediaHttpDownloader
java.lang.Object
   ↳ com.kinvey.java.core.MediaHttpDownloader
     ↳ com.kinvey.java.offline.MediaOfflineDownloader

Summary

[Expand]
Inherited Constants
From class com.kinvey.java.core.MediaHttpDownloader
Public Constructors
MediaOfflineDownloader(HttpTransport transport, HttpRequestInitializer httpRequestInitializer, FilePolicy policy, FileCache cache)
Construct the MediaHttpDownloader.
Public Methods
void download(AbstractKinveyClientRequest request, OutputStream out)
Executes a direct media download or a resumable media download.
void fromCache(AbstractClient client, AbstractKinveyClientRequest request, OutputStream out)
void fromService(AbstractKinveyClientRequest request, OutputStream out)
[Expand]
Inherited Methods
From class com.kinvey.java.core.MediaHttpDownloader
From class java.lang.Object

Public Constructors

public MediaOfflineDownloader (HttpTransport transport, HttpRequestInitializer httpRequestInitializer, FilePolicy policy, FileCache cache)

Construct the MediaHttpDownloader.

Parameters
transport The transport to use for requests
httpRequestInitializer The initializer to use when creating an com.google.api.client.http.HttpRequest or null for none

Public Methods

public void download (AbstractKinveyClientRequest request, OutputStream out)

Executes a direct media download or a resumable media download.

This method does not close the given output stream.

This method is not reentrant. A new instance of MediaHttpDownloader must be instantiated before download called be called again.

Parameters
request request object used to request unique uri from kinvey
out output stream to dump bytes as they stream off the wire
Throws
IOException

public void fromCache (AbstractClient client, AbstractKinveyClientRequest request, OutputStream out)

Throws
IOException

public void fromService (AbstractKinveyClientRequest request, OutputStream out)

Throws
IOException