自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
MergedZipEntryCollection
public
class
MergedZipEntryCollection
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.zip.MergedZipEntryCollection
|
将大型 ZIP 文件中的各个 ZIP 条目合并为分块,以最大限度地减少下载尝试次数。
摘要
常量
public static final int HEADER_SIZE
常量值:
2078
(0x0000081e)
MAX_GAP
public static final int MAX_GAP
常量值:
4096
(0x00001000)
MAX_GAP_PERCENTAGE
public static final double MAX_GAP_PERCENTAGE
常量值:
0.15
公共构造函数
MergedZipEntryCollection
public MergedZipEntryCollection ( zipEntries)
公共方法
createCollections
public static createCollections ( zipEntries)
getEndOffset
public long getEndOffset ()
getStartOffset
public long getStartOffset ()
getZipEntries
public getZipEntries ()
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# MergedZipEntryCollection\n========================\n\n\n`\npublic\n\n\nclass\nMergedZipEntryCollection\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.util.zip.MergedZipEntryCollection |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nMerge individual zip entries in a large zip file into blocks to minimize the download attempts.\n\nSummary\n-------\n\n| ### Constants ||\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [HEADER_SIZE](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#HEADER_SIZE) |\n| `int` | [MAX_GAP](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#MAX_GAP) |\n| `double` | [MAX_GAP_PERCENTAGE](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#MAX_GAP_PERCENTAGE) |\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[MergedZipEntryCollection](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#MergedZipEntryCollection(\u003cany\u003e))`(` zipEntries) |\n\n| ### Public methods ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static ` | ` `[createCollections](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#createCollections(\u003cany\u003e))`(` zipEntries) |\n| ` long` | ` `[getEndOffset](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#getEndOffset())`() ` |\n| ` long` | ` `[getStartOffset](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#getStartOffset())`() ` |\n| ` ` | ` `[getZipEntries](../../../../../../../reference/tradefed/com/android/tradefed/util/zip/MergedZipEntryCollection.html#getZipEntries())`() ` |\n\nConstants\n---------\n\n### HEADER_SIZE\n\n```\npublic static final int HEADER_SIZE\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2078\n(0x0000081e)\n\n\n### MAX_GAP\n\n```\npublic static final int MAX_GAP\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n4096\n(0x00001000)\n\n\n### MAX_GAP_PERCENTAGE\n\n```\npublic static final double MAX_GAP_PERCENTAGE\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0.15\n\n\nPublic constructors\n-------------------\n\n### MergedZipEntryCollection\n\n```\npublic MergedZipEntryCollection ( zipEntries)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------|\n| `zipEntries` | \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### createCollections\n\n```\npublic static createCollections ( zipEntries)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------|\n| `zipEntries` | \u003cbr /\u003e |\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n### getEndOffset\n\n```\npublic long getEndOffset ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### getStartOffset\n\n```\npublic long getStartOffset ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `long` | \u003cbr /\u003e |\n\n### getZipEntries\n\n```\npublic getZipEntries ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |"]]