com.steerpath.sdk.storage.FileUpdater |
This is mainly for SDK internals and has little use outside of the SDK.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
downloadUpdate(String url, File file)
Downloads update for the File in the background.
| ||||||||||
abstract void |
downloadUpdate(File file)
Downloads update for the File in the background.
| ||||||||||
abstract File |
getUpdate(File file)
Returns local File from /updates folder.
| ||||||||||
abstract boolean |
install(String url, File file)
Takes updated File into use.
| ||||||||||
abstract boolean |
install(File file)
Takes updated File into use.
| ||||||||||
abstract boolean |
isExpired(File file)
Checks if File is expired.@return
| ||||||||||
abstract boolean |
isExpired(String url)
Checks if File is expired.@return
| ||||||||||
abstract boolean |
isUpdateAvailable(File file)
Checks if update has been downloaded for the File.
| ||||||||||
abstract void |
on200(File file, String url, String etag, long expiry)
After file update has been downloaded, notify network response code 200.
| ||||||||||
abstract void |
on304(File file, String url, String etag, long expiry)
After file update has been downloaded, notify network response code 304.
| ||||||||||
abstract void |
updateEtag(String url, File updateFile)
Updates File's etag.
|
Downloads update for the File in the background.
url | the url where the File was fetched |
---|---|
file | file to be updated |
Downloads update for the File in the background.
file | file to be updated |
---|
Returns local File from /updates folder.
Takes updated File into use.
url | the url where the File was fetched |
---|---|
file | original "old" file |
Takes updated File into use.
file | original "old" file |
---|
Checks if File is expired.@return
Checks if File is expired.@return
Checks if update has been downloaded for the File.
After file update has been downloaded, notify network response code 200.
After file update has been downloaded, notify network response code 304.
Updates File's etag.