Stay organized with collections
Save and categorize content based on your preferences.
ZipPathValidator.Callback
public
static
interface
ZipPathValidator.Callback
dalvik.system.ZipPathValidator.Callback
|
Interface that defines the core validation mechanism when accessing zip file entry paths.
Summary
Public methods |
default
void
|
onZipEntryAccess(String path)
Called to check the validity of the path of a zip entry.
|
Public methods
onZipEntryAccess
public void onZipEntryAccess (String path)
Called to check the validity of the path of a zip entry. The default implementation
accepts all paths without raising any exceptions.
This method will be called by ZipInputStream.getNextEntry()
or
ZipFile.ZipFile(String)
.
Parameters |
path |
String : The name of the zip entry.
This value cannot be null . |
Throws |
ZipException |
If the zip entry is invalid depending on the implementation. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ZipPathValidator.Callback\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nZipPathValidator.Callback\n=========================\n\n\n`\npublic\nstatic\n\n\ninterface\nZipPathValidator.Callback\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------|\n| dalvik.system.ZipPathValidator.Callback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface that defines the core validation mechanism when accessing zip file entry paths.\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` default void` | ` `[onZipEntryAccess](/reference/dalvik/system/ZipPathValidator.Callback#onZipEntryAccess(java.lang.String))`(`[String](/reference/java/lang/String)` path) ` Called to check the validity of the path of a zip entry. |\n\nPublic methods\n--------------\n\n### onZipEntryAccess\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onZipEntryAccess (String path)\n```\n\nCalled to check the validity of the path of a zip entry. The default implementation\naccepts all paths without raising any exceptions.\n\n\nThis method will be called by [ZipInputStream.getNextEntry()](/reference/java/util/zip/ZipInputStream#getNextEntry()) or\n[ZipFile.ZipFile(String)](/reference/java/util/zip/ZipFile#ZipFile(java.lang.String)).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------|\n| `path` | `String`: The name of the zip entry. This value cannot be `null`. \u003cbr /\u003e |\n\n| Throws ||\n|-------------------------------------------------------|--------------------------------------------------------------|\n| [ZipException](/reference/java/util/zip/ZipException) | If the zip entry is invalid depending on the implementation. |"]]