Stay organized with collections
Save and categorize content based on your preferences.
OnCloseListener
interface OnCloseListener
Callback indicating that a ParcelFileDescriptor has been closed.
Summary
Public methods |
abstract Unit |
Event indicating the ParcelFileDescriptor to which this listener was attached has been closed.
|
Public methods
onClose
abstract fun onClose(e: IOException!): Unit
Event indicating the ParcelFileDescriptor to which this listener was attached has been closed.
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,["# ParcelFileDescriptor.OnCloseListener\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnCloseListener\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/ParcelFileDescriptor.OnCloseListener \"View this page in Java\") \n\n```\ninterface OnCloseListener\n```\n\n|------------------------------------------------------|\n| [android.os.ParcelFileDescriptor.OnCloseListener](#) |\n\nCallback indicating that a ParcelFileDescriptor has been closed.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onClose](#onClose(java.io.IOException))`(`e:` `[IOException](../../java/io/IOException.html#)!`)` Event indicating the ParcelFileDescriptor to which this listener was attached has been closed. |\n\nPublic methods\n--------------\n\n### onClose\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onClose(e: IOException!): Unit\n```\n\nEvent indicating the ParcelFileDescriptor to which this listener was attached has been closed.\n\n| Parameters ||\n|-----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `e` | [IOException](../../java/io/IOException.html#)!: error state, or `null` if closed cleanly. If the close event was the result of [ParcelFileDescriptor.detachFd()](/reference/kotlin/android/os/ParcelFileDescriptor#detachFd()), this will be a [FileDescriptorDetachedException](/reference/kotlin/android/os/ParcelFileDescriptor.FileDescriptorDetachedException). After detach the remote side may continue reading/writing to the underlying [FileDescriptor](../../java/io/FileDescriptor.html#), but they can no longer deliver reliable close/error events. |"]]