com.bumptech.glide.load.data
Class StreamLocalUriFetcher

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

public class StreamLocalUriFetcher
extends LocalUriFetcher<InputStream>

Fetches an InputStream for a local Uri.


Constructor Summary
StreamLocalUriFetcher(Context context, Uri uri)
           
 
Method Summary
protected  void close(InputStream data)
          Closes the concrete data type if necessary.
protected  InputStream 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

StreamLocalUriFetcher

public StreamLocalUriFetcher(Context context,
                             Uri uri)
Method Detail

loadResource

protected InputStream 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<InputStream>
Throws:
FileNotFoundException

close

protected void close(InputStream 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<InputStream>
Parameters:
data - The data to close.
Throws:
IOException