public class StreamAssetPathFetcher extends AssetPathFetcher<java.io.InputStream>
InputStream
for an asset path.DataFetcher.DataCallback<T>
Constructor and Description |
---|
StreamAssetPathFetcher(android.content.res.AssetManager assetManager,
java.lang.String assetPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(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.InputStream |
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, loadData
public StreamAssetPathFetcher(android.content.res.AssetManager assetManager, java.lang.String assetPath)
protected java.io.InputStream loadResource(android.content.res.AssetManager assetManager, java.lang.String path) throws java.io.IOException
AssetPathFetcher
AssetManager
and returns
the concrete data type returned by the AssetManager.loadResource
in class AssetPathFetcher<java.io.InputStream>
assetManager
- An AssetManager to use to open the given path.path
- A string path pointing to a resource in assets to open.java.io.IOException
protected void close(java.io.InputStream data) throws java.io.IOException
AssetPathFetcher
close
in class AssetPathFetcher<java.io.InputStream>
data
- The data to close.java.io.IOException
@NonNull public java.lang.Class<java.io.InputStream> getDataClass()
DataFetcher