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