Stay organized with collections
Save and categorize content based on your preferences.
Callback
interface Callback
Interface that defines the core validation mechanism when accessing zip file entry paths.
Summary
Public methods |
open Unit |
Called to check the validity of the path of a zip entry.
|
Public methods
onZipEntryAccess
open fun onZipEntryAccess(path: String): Unit
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 java.util.zip.ZipInputStream#getNextEntry
or java.util.zip.ZipFile#ZipFile(String)
.
Parameters |
path |
String: The name of the zip entry. This value cannot be null . |
Exceptions |
java.util.zip.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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ZipPathValidator.Callback\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCallback\n========\n\n```\ninterface Callback\n```\n\n|----------------------------------------------|\n| [dalvik.system.ZipPathValidator.Callback](#) |\n\nInterface that defines the core validation mechanism when accessing zip file entry paths.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onZipEntryAccess](#onZipEntryAccess(kotlin.String))`(`path:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onZipEntryAccess(path: String): Unit\n```\n\nCalled to check the validity of the path of a zip entry. The default implementation accepts all paths without raising any exceptions.\n\nThis method will be called by [java.util.zip.ZipInputStream#getNextEntry](../../java/util/zip/ZipInputStream.html#getNextEntry()) or [java.util.zip.ZipFile#ZipFile(String)](../../java/util/zip/ZipFile.html#ZipFile(kotlin.String)).\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `path` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The name of the zip entry. This value cannot be `null`. |\n\n| Exceptions ||\n|------------------------------|--------------------------------------------------------------|\n| `java.util.zip.ZipException` | If the zip entry is invalid depending on the implementation. |"]]