Package com.jme3.asset.plugins
Class HttpZipLocator
java.lang.Object
com.jme3.asset.plugins.HttpZipLocator
- All Implemented Interfaces:
- AssetLocator
HttpZipLocator is similar to ZipLocator, except
 it allows loading assets from a .ZIP file on the web instead of
 on the local filesystem.
 
 The root path must be a valid HTTP(S) URL pointing to ZIP or
 ZIP-like file (such as a JAR). For example,
 https://www.example.com/my/sub/path/assets.zip.
 
 The locator is designed in such a way that it does not require downloading
 the entire .ZIP file from the web in order to load
 assets from it. Instead, the ZIP header is extracted first, and then
 is used to lookup assets from within the ZIP file and download them
 as requested by the user.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidlocate(AssetManager manager, AssetKey key) Request to locate an asset.openStream(String name) voidsetRootPath(String path) 
- 
Constructor Details- 
HttpZipLocatorpublic HttpZipLocator()
 
- 
- 
Method Details- 
load- Throws:
- IOException
 
- 
openStream- Throws:
- IOException
 
- 
setRootPath- Specified by:
- setRootPathin interface- AssetLocator
- Parameters:
- path- The root path where to look for assets. Typically, this method will only be called once for each instance of an asset locator.
 
- 
locateDescription copied from interface:AssetLocatorRequest to locate an asset. The asset key contains a name identifying the asset. If an asset was not found, null should be returned. TheAssetInfoimplementation provided should have a proper return value for itsAssetInfo.openStream()method.- Specified by:
- locatein interface- AssetLocator
- Parameters:
- manager- for managing assets
- key- identifies the asset to be located
- Returns:
- The AssetInfothat was located, or null if not found.
 
 
-