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, loadDatapublic StreamAssetPathFetcher(AssetManager assetManager, String assetPath)
protected InputStream loadResource(AssetManager assetManager, String path) throws IOException
AssetPathFetcherAssetManager 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.IOExceptionprotected void close(InputStream data) throws IOException
AssetPathFetcherclose in class AssetPathFetcher<InputStream>data - The data to close.IOExceptionpublic Class<InputStream> getDataClass()
DataFetcher