Package com.massifmaps.utils
Class ZippedAssetPackage
java.lang.Object
com.massifmaps.utils.AssetPackage
com.massifmaps.utils.ZippedAssetPackage
An asset package based on ZIP archived.
Only deflate-based ZIP archives are supported.
Only deflate-based ZIP archives are supported.
-
Constructor Summary
ConstructorsConstructorDescriptionZippedAssetPackage(BinaryData zipData) Constructs a ZIP asset package from the archived binary data.ZippedAssetPackage(BinaryData zipData, AssetPackage baseAssetPackage) Constructs a ZIP asset package from the archived binary data and a fallback asset package. -
Method Summary
Modifier and TypeMethodDescriptionReturns list of assets in the asset package.
All listed assets can read using loadAsset API.Loads the specified asset from the asset package.Methods inherited from class com.massifmaps.utils.AssetPackage
equals, hashCode
-
Constructor Details
-
ZippedAssetPackage
Constructs a ZIP asset package from the archived binary data.- Parameters:
zipData- The ZIP archive.
-
ZippedAssetPackage
Constructs a ZIP asset package from the archived binary data and a fallback asset package.- Parameters:
zipData- The ZIP archive.baseAssetPackage- The base asset package. If an asset is not found in the ZIP archive, base asset package is used.
-
-
Method Details
-
getLocalAssetNames
-
getAssetNames
Description copied from class:AssetPackageReturns list of assets in the asset package.
All listed assets can read using loadAsset API.- Overrides:
getAssetNamesin classAssetPackage- Returns:
- List of asset names.
-
loadAsset
Description copied from class:AssetPackageLoads the specified asset from the asset package.- Overrides:
loadAssetin classAssetPackage- Parameters:
name- The asset name to read.- Returns:
- Asset data, if the asset exists and was successfully read. Null pointer otherwise.
-