Package com.massifmaps.utils
Class AssetPackage
java.lang.Object
com.massifmaps.utils.AssetPackage
- Direct Known Subclasses:
AndroidAssetPackage,BundleAssetPackage,DirAssetPackage,ZippedAssetPackage
An abstract asset package class. Contains methods to list and load assets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.Returns list of assets in the asset package.
All listed assets can read using loadAsset API.inthashCode()Returns the hash value of this object.Loads the specified asset from the asset package.
-
Constructor Details
-
AssetPackage
protected AssetPackage()
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getAssetNames
Returns list of assets in the asset package.
All listed assets can read using loadAsset API.- Returns:
- List of asset names.
-
loadAsset
Loads the specified asset from the asset package.- Parameters:
name- The asset name to read.- Returns:
- Asset data, if the asset exists and was successfully read. Null pointer otherwise.
-