Package com.bumptech.glide.load.data
Class AssetFileDescriptorLocalUriFetcher
- java.lang.Object
-
- com.bumptech.glide.load.data.LocalUriFetcher<android.content.res.AssetFileDescriptor>
-
- com.bumptech.glide.load.data.AssetFileDescriptorLocalUriFetcher
-
- All Implemented Interfaces:
DataFetcher<android.content.res.AssetFileDescriptor>
public final class AssetFileDescriptorLocalUriFetcher extends LocalUriFetcher<android.content.res.AssetFileDescriptor>
Fetches anAssetFileDescriptorfor a localUri.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.bumptech.glide.load.data.DataFetcher
DataFetcher.DataCallback<T>
-
-
Constructor Summary
Constructors Constructor Description AssetFileDescriptorLocalUriFetcher(android.content.ContentResolver contentResolver, android.net.Uri uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose(android.content.res.AssetFileDescriptor data)Closes the concrete data type if necessary.java.lang.Class<android.content.res.AssetFileDescriptor>getDataClass()Returns the class of the data this fetcher will attempt to obtain.protected android.content.res.AssetFileDescriptorloadResource(android.net.Uri uri, android.content.ContentResolver contentResolver)Returns a concrete data type from the givenUriusing the givenContentResolver.-
Methods inherited from class com.bumptech.glide.load.data.LocalUriFetcher
cancel, cleanup, getDataSource, loadData
-
-
-
-
Method Detail
-
loadResource
protected android.content.res.AssetFileDescriptor loadResource(android.net.Uri uri, android.content.ContentResolver contentResolver) throws java.io.FileNotFoundExceptionDescription copied from class:LocalUriFetcherReturns a concrete data type from the givenUriusing the givenContentResolver.- Specified by:
loadResourcein classLocalUriFetcher<android.content.res.AssetFileDescriptor>- Throws:
java.io.FileNotFoundException
-
close
protected void close(android.content.res.AssetFileDescriptor data) throws java.io.IOExceptionDescription copied from class:LocalUriFetcherCloses the concrete data type if necessary.Note - We can't rely on the closeable interface because it was added after our min API level. See issue #157.
- Specified by:
closein classLocalUriFetcher<android.content.res.AssetFileDescriptor>- Parameters:
data- The data to close.- Throws:
java.io.IOException
-
getDataClass
@NonNull public java.lang.Class<android.content.res.AssetFileDescriptor> getDataClass()
Description copied from interface:DataFetcherReturns the class of the data this fetcher will attempt to obtain.
-
-