public class

AssetPackage

extends Object
java.lang.Object
   ↳ com.carto.utils.AssetPackage
Known Direct Subclasses

Class Overview

An abstract asset package class. Contains methods to list and load assets.

Summary

Public Methods
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
StringVector getAssetNames()
Returns list of assets in the asset package.
int hashCode()
Returns the hash value of this object.
BinaryData loadAsset(String name)
Loads the specified asset from the asset package.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public StringVector getAssetNames ()

Returns list of assets in the asset package.
All listed assets can read using loadAsset API.

Returns
  • List of asset names.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

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.