saveToCache

open fun saveToCache(@NonNull sourceUri: Uri, @NonNull cachePath: Array<String>): Uri

Save content from provided uri to cache.

Return

uri of file saved, null - error.

Parameters

sourceUri

- uri of source content to be saved

cachePath

- name of file


open fun saveToCache(@NonNull sourceFile: File, @NonNull cachePath: Array<String>): Uri
open fun saveToCache(@NonNull sourceStream: InputStream, @NonNull cachePath: Array<String>): Uri


open fun saveToCache(bytes: Array<Byte>, @NonNull cachePath: Array<String>): Uri

Save content from provided byte array to cache.

Return

uri of file saved, null - error.

Parameters

bytes

- byte array of source content to be saved

cachePath

- name of file


open fun saveToCache(@NonNull bitmap: Bitmap, @NonNull cachePath: Array<String>): Uri

Save content from provided bitmap to cache.

Return

uri of file saved, null - error.

Parameters

bitmap

- bitmap of source content to be saved

cachePath

- name of file