public class StreamAssetPathFetcher extends AssetPathFetcher<InputStream>
InputStream
for an asset path.DataFetcher.DataCallback<T>
Constructor and Description |
---|
StreamAssetPathFetcher(AssetManager assetManager,
String assetPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(InputStream data)
Closes the concrete data type if necessary.
|
Class<InputStream> |
getDataClass()
Returns the class of the data this fetcher will attempt to obtain.
|
protected InputStream |
loadResource(AssetManager assetManager,
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(AssetManager assetManager, String assetPath)
protected InputStream loadResource(AssetManager assetManager, String path) throws IOException
AssetPathFetcher
AssetManager
and returns
the concrete data type returned by the AssetManager.loadResource
in class AssetPathFetcher<InputStream>
assetManager
- An AssetManager to use to open the given path.path
- A string path pointing to a resource in assets to open.IOException
protected void close(InputStream data) throws IOException
AssetPathFetcher
close
in class AssetPathFetcher<InputStream>
data
- The data to close.IOException
@NonNull public Class<InputStream> getDataClass()
DataFetcher