public final class AssetFileDescriptorLocalUriFetcher extends LocalUriFetcher<AssetFileDescriptor>
AssetFileDescriptor
for a local Uri
.DataFetcher.DataCallback<T>
Constructor and Description |
---|
AssetFileDescriptorLocalUriFetcher(ContentResolver contentResolver,
Uri uri) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(AssetFileDescriptor data)
Closes the concrete data type if necessary.
|
Class<AssetFileDescriptor> |
getDataClass()
Returns the class of the data this fetcher will attempt to obtain.
|
protected AssetFileDescriptor |
loadResource(Uri uri,
ContentResolver contentResolver)
Returns a concrete data type from the given
Uri using the given ContentResolver . |
cancel, cleanup, getDataSource, loadData
public AssetFileDescriptorLocalUriFetcher(ContentResolver contentResolver, Uri uri)
protected AssetFileDescriptor loadResource(Uri uri, ContentResolver contentResolver) throws FileNotFoundException
LocalUriFetcher
Uri
using the given ContentResolver
.loadResource
in class LocalUriFetcher<AssetFileDescriptor>
FileNotFoundException
protected void close(AssetFileDescriptor data) throws IOException
LocalUriFetcher
Note - We can't rely on the closeable interface because it was added after our min API level. See issue #157.
close
in class LocalUriFetcher<AssetFileDescriptor>
data
- The data to close.IOException
@NonNull public Class<AssetFileDescriptor> getDataClass()
DataFetcher