public class FileDescriptorAssetPathFetcher extends AssetPathFetcher<ParcelFileDescriptor>
ParcelFileDescriptor
for an asset path.DataFetcher.DataCallback<T>
Constructor and Description |
---|
FileDescriptorAssetPathFetcher(AssetManager assetManager,
String assetPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(ParcelFileDescriptor data)
Closes the concrete data type if necessary.
|
Class<ParcelFileDescriptor> |
getDataClass()
Returns the class of the data this fetcher will attempt to obtain.
|
protected ParcelFileDescriptor |
loadResource(AssetManager assetManager,
String path)
Opens the given asset path with the given
AssetManager and returns
the concrete data type returned by the AssetManager. |
cancel, cleanup, getDataSource, loadData
public FileDescriptorAssetPathFetcher(AssetManager assetManager, String assetPath)
protected ParcelFileDescriptor loadResource(AssetManager assetManager, String path) throws IOException
AssetPathFetcher
AssetManager
and returns
the concrete data type returned by the AssetManager.loadResource
in class AssetPathFetcher<ParcelFileDescriptor>
assetManager
- An AssetManager to use to open the given path.path
- A string path pointing to a resource in assets to open.IOException
protected void close(ParcelFileDescriptor data) throws IOException
AssetPathFetcher
close
in class AssetPathFetcher<ParcelFileDescriptor>
data
- The data to close.IOException
@NonNull public Class<ParcelFileDescriptor> getDataClass()
DataFetcher