Package com.bumptech.glide.load.data
Class FileDescriptorAssetPathFetcher
- java.lang.Object
-
- com.bumptech.glide.load.data.AssetPathFetcher<android.content.res.AssetFileDescriptor>
-
- com.bumptech.glide.load.data.FileDescriptorAssetPathFetcher
-
- All Implemented Interfaces:
DataFetcher<android.content.res.AssetFileDescriptor>
public class FileDescriptorAssetPathFetcher extends AssetPathFetcher<android.content.res.AssetFileDescriptor>
Fetches anAssetFileDescriptorfor an asset path.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.bumptech.glide.load.data.DataFetcher
DataFetcher.DataCallback<T>
-
-
Constructor Summary
Constructors Constructor Description FileDescriptorAssetPathFetcher(android.content.res.AssetManager assetManager, java.lang.String assetPath)
-
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.content.res.AssetManager assetManager, java.lang.String path)Opens the given asset path with the givenAssetManagerand returns the concrete data type returned by the AssetManager.-
Methods inherited from class com.bumptech.glide.load.data.AssetPathFetcher
cancel, cleanup, getDataSource, loadData
-
-
-
-
Method Detail
-
loadResource
protected android.content.res.AssetFileDescriptor loadResource(android.content.res.AssetManager assetManager, java.lang.String path) throws java.io.IOExceptionDescription copied from class:AssetPathFetcherOpens the given asset path with the givenAssetManagerand returns the concrete data type returned by the AssetManager.- Specified by:
loadResourcein classAssetPathFetcher<android.content.res.AssetFileDescriptor>- Parameters:
assetManager- An AssetManager to use to open the given path.path- A string path pointing to a resource in assets to open.- Throws:
java.io.IOException
-
close
protected void close(android.content.res.AssetFileDescriptor data) throws java.io.IOExceptionDescription copied from class:AssetPathFetcherCloses the concrete data type if necessary.- Specified by:
closein classAssetPathFetcher<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.
-
-