Class AssetPackage

java.lang.Object
com.massifmaps.utils.AssetPackage
Direct Known Subclasses:
AndroidAssetPackage, BundleAssetPackage, DirAssetPackage, ZippedAssetPackage

public class AssetPackage extends Object
An abstract asset package class. Contains methods to list and load assets.
  • Constructor Details

    • AssetPackage

      protected AssetPackage()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • getAssetNames

      public StringVector getAssetNames()
      Returns list of assets in the asset package.
      All listed assets can read using loadAsset API.
      Returns:
      List of asset names.
    • loadAsset

      public BinaryData loadAsset(String name)
      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.