Stay organized with collections
Save and categorize content based on your preferences.
AssetLocation
public
abstract
class
AssetLocation
extends Object
Location of a single asset, belonging to an asset pack.
If the AssetPackStorageMethod for the pack is AssetPackStorageMethod.APK_ASSETS
, this
will be the path to the APK containing the asset, the offset of the asset inside the APK and the
size of the asset. The asset file will be uncompressed, unless `bundletool` has been explicitly
configured to compress the asset pack.
If the AssetPackStorageMethod for the pack is AssetPackStorageMethod.STORAGE_FILES
,
this will be the path to the specific asset, the offset will be 0 and the size will be the size
of the asset file. The asset file will be uncompressed.
Summary
Public methods |
abstract
long
|
offset()
Returns the file offset where the asset starts, in bytes.
|
abstract
String
|
path()
Returns the path to the file containing the asset.
|
abstract
long
|
size()
Returns the size of the asset, in bytes.
|
Inherited methods |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
AssetLocation
public AssetLocation ()
Public methods
offset
public abstract long offset ()
Returns the file offset where the asset starts, in bytes.
path
public abstract String path ()
Returns the path to the file containing the asset.
size
public abstract long size ()
Returns the size of the asset, in bytes.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# AssetLocation\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nAssetLocation\n=============\n\n\n`\npublic\n\n\nabstract\nclass\nAssetLocation\n`\n\n\n`\n\nextends `[Object](https://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------------------|\n| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | com.google.android.play.core.assetpacks.AssetLocation |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nLocation of a single asset, belonging to an asset pack.\n\nIf the AssetPackStorageMethod for the pack is [AssetPackStorageMethod.APK_ASSETS](../../../../../../../reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#APK_ASSETS), this\nwill be the path to the APK containing the asset, the offset of the asset inside the APK and the\nsize of the asset. The asset file will be uncompressed, unless \\`bundletool\\` has been explicitly\nconfigured to compress the asset pack.\n\nIf the AssetPackStorageMethod for the pack is [AssetPackStorageMethod.STORAGE_FILES](../../../../../../../reference/com/google/android/play/core/assetpacks/model/AssetPackStorageMethod.html#STORAGE_FILES),\nthis will be the path to the specific asset, the offset will be 0 and the size will be the size\nof the asset file. The asset file will be uncompressed.\n\nSummary\n-------\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[AssetLocation](../../../../../../../reference/com/google/android/play/core/assetpacks/AssetLocation.html#AssetLocation())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract long` | ` `[offset](../../../../../../../reference/com/google/android/play/core/assetpacks/AssetLocation.html#offset())`() ` Returns the file offset where the asset starts, in bytes. |\n| ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[path](../../../../../../../reference/com/google/android/play/core/assetpacks/AssetLocation.html#path())`() ` Returns the path to the file containing the asset. |\n| ` abstract long` | ` `[size](../../../../../../../reference/com/google/android/play/core/assetpacks/AssetLocation.html#size())`() ` Returns the size of the asset, in bytes. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` boolean` | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### AssetLocation\n\n```\npublic AssetLocation ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### offset\n\n```\npublic abstract long offset ()\n```\n\nReturns the file offset where the asset starts, in bytes.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### path\n\n```\npublic abstract String path ()\n```\n\nReturns the path to the file containing the asset.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------|--------|\n| [String](https://developer.android.com/reference/java/lang/String.html) | \u003cbr /\u003e |\n\n### size\n\n```\npublic abstract long size ()\n```\n\nReturns the size of the asset, in bytes.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |"]]