[SOLVED] How can I get a resource as a stream using assetsManager?

how can I get a resource as a stream using assetsManager?

or how can I use getClass().getResourceAsStream("Interface/hud/hourglass.gif") to load the gif file from assets.jar file?

AssetInfo info=assetManager.locateAsset(new AssetKey( "Interface/hud/hourglass.gif"));
if(info==null) {
  // not found
}else{
  InputStream is=info.openStream();
  // ...
 is.close();
}
2 Likes