Package com.bumptech.glide.load.data
Class StreamAssetPathFetcher
- java.lang.Object
-
- com.bumptech.glide.load.data.AssetPathFetcher<java.io.InputStream>
-
- com.bumptech.glide.load.data.StreamAssetPathFetcher
-
- All Implemented Interfaces:
DataFetcher<java.io.InputStream>
public class StreamAssetPathFetcher extends AssetPathFetcher<java.io.InputStream>
Fetches anInputStreamfor an asset path.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.bumptech.glide.load.data.DataFetcher
DataFetcher.DataCallback<T>
-
-
Constructor Summary
Constructors Constructor Description StreamAssetPathFetcher(android.content.res.AssetManager assetManager, java.lang.String assetPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose(java.io.InputStream data)Closes the concrete data type if necessary.java.lang.Class<java.io.InputStream>getDataClass()Returns the class of the data this fetcher will attempt to obtain.protected java.io.InputStreamloadResource(android.content.res.AssetManager assetManager, java.lang.String path)Opens the given asset path with the givenAssetManagerand returns the concrete data type returned by the AssetManager.-
Methods inherited from class com.bumptech.glide.load.data.AssetPathFetcher
cancel, cleanup, getDataSource, loadData
-
-
-
-
Method Detail
-
loadResource
protected java.io.InputStream loadResource(android.content.res.AssetManager assetManager, java.lang.String path) throws java.io.IOExceptionDescription copied from class:AssetPathFetcherOpens the given asset path with the givenAssetManagerand returns the concrete data type returned by the AssetManager.- Specified by:
loadResourcein classAssetPathFetcher<java.io.InputStream>- Parameters:
assetManager- An AssetManager to use to open the given path.path- A string path pointing to a resource in assets to open.- Throws:
java.io.IOException
-
close
protected void close(java.io.InputStream data) throws java.io.IOExceptionDescription copied from class:AssetPathFetcherCloses the concrete data type if necessary.- Specified by:
closein classAssetPathFetcher<java.io.InputStream>- Parameters:
data- The data to close.- Throws:
java.io.IOException
-
getDataClass
@NonNull public java.lang.Class<java.io.InputStream> getDataClass()
Description copied from interface:DataFetcherReturns the class of the data this fetcher will attempt to obtain.
-
-