app / sg.edu.ntu.scse.cz2006.gymbuddies.util / DiskIOHelper

DiskIOHelper

open class DiskIOHelper : AppConstants

DiskIOHelper provides the ability to cache bitmap into application's internal storage. it improves loading speed and reduce number of downloads to save user's data usage

Author
Chia Yu

Since
2019-10-23

Constructors

<init>

DiskIOHelper provides the ability to cache bitmap into application's internal storage. it improves loading speed and reduce number of downloads to save user's data usage

DiskIOHelper()

Properties

DIR_PIC

static val DIR_PIC: String

TAG

static val TAG: String

Functions

hasImageCache

the method checks whether cached bitmap file is exist in application's internal folder. note that the bitmap only valid for a day, after that the cache will be deleted.

open static fun hasImageCache(context: Context!, fileName: String!): Boolean

readImageCache

the method retrieve bitmap from application's internal storage

open static fun readImageCache(context: Context!, name: String!): Bitmap!

saveImageCache

the method perform saving of bitmap into application's internal storage

open static fun saveImageCache(context: Context!, bmp: Bitmap!, name: String!): Unit