LoadHelper

open class LoadHelper

Convenience class to parse Uri's.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Return the integer resource id for the specified resource name.
Link copied to clipboard
open fun enableCaching(context: Context)
Enables HTTP caching with default settings, remote Uri requests responses are cached to cacheBaseDir/cacheFolderName
open fun enableCaching(cacheByteSize: Long, cacheBaseDir: File, cacheFolderName: String)
Enables HTTP caching, remote Uri requests responses are cached to cacheBaseDir/cacheFolderName
Link copied to clipboard
open fun flushHttpCache()
Link copied to clipboard
open fun fromResource(context: Context, resId: Int): Callable<InputStream>
Creates an InputStream from an Android resource ID.
Link copied to clipboard
open fun fromUri(context: Context, sourceUri: Uri): Callable<InputStream>
Creates different InputStreams depending on the contents of the Uri
open fun fromUri(context: Context, sourceUri: Uri, @Nullable requestProperty: Map<String, String>): Callable<InputStream>
Creates different InputStreams depending on the contents of the Uri.
Link copied to clipboard
open fun getLastPathSegment(uri: Uri): String
Link copied to clipboard
open fun isAndroidResource(sourceUri: Uri): Boolean
True if the Uri is an Android resource, false if any other uri.
Link copied to clipboard
open fun isContentResource(sourceUri: Uri): Boolean
True if the Uri is an Android resource, false if any other uri.
Link copied to clipboard
open fun isDataUri(uri: Uri): Boolean
Link copied to clipboard
open fun isFileAsset(sourceUri: Uri): Boolean
True if the Uri is a filename, false if it is a remote location.
Link copied to clipboard
open fun isGltfDataUri(uri: Uri): Boolean
Link copied to clipboard
open fun rawResourceNameToIdentifier(context: Context, name: String): Int
Return the integer resource id for the specified resource name.
Link copied to clipboard
open fun resolveUri(unresolvedUri: Uri, @Nullable parentUri: Uri): Uri
Normalizes Uri's based on a reference Uri.
Link copied to clipboard
open fun resourceToUri(context: Context, resID: Int): Uri
Generates a Uri from an Android resource.