com.bumptech.glide.load.data
Class FileDescriptorLocalUriFetcher

java.lang.Object
  extended by com.bumptech.glide.load.data.LocalUriFetcher<ParcelFileDescriptor>
      extended by com.bumptech.glide.load.data.FileDescriptorLocalUriFetcher
All Implemented Interfaces:
DataFetcher<ParcelFileDescriptor>

public class FileDescriptorLocalUriFetcher
extends LocalUriFetcher<ParcelFileDescriptor>

Fetches an ParcelFileDescriptor for a local Uri.


Constructor Summary
FileDescriptorLocalUriFetcher(Context context, Uri uri)
           
 
Method Summary
protected  void close(ParcelFileDescriptor data)
          Closes the concrete data type if necessary.
protected  ParcelFileDescriptor loadResource(Uri uri, ContentResolver contentResolver)
          Returns a concrete data type from the given Uri using the given ContentResolver.
 
Methods inherited from class com.bumptech.glide.load.data.LocalUriFetcher
cancel, cleanup, getId, loadData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDescriptorLocalUriFetcher

public FileDescriptorLocalUriFetcher(Context context,
                                     Uri uri)
Method Detail

loadResource

protected ParcelFileDescriptor loadResource(Uri uri,
                                            ContentResolver contentResolver)
                                     throws FileNotFoundException
Description copied from class: LocalUriFetcher
Returns a concrete data type from the given Uri using the given ContentResolver.

Specified by:
loadResource in class LocalUriFetcher<ParcelFileDescriptor>
Throws:
FileNotFoundException

close

protected void close(ParcelFileDescriptor data)
              throws IOException
Description copied from class: LocalUriFetcher
Closes 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:
close in class LocalUriFetcher<ParcelFileDescriptor>
Parameters:
data - The data to close.
Throws:
IOException