Stay organized with collections
Save and categorize content based on your preferences.
ParcelFileDescriptor.OnCloseListener
public
static
interface
ParcelFileDescriptor.OnCloseListener
android.os.ParcelFileDescriptor.OnCloseListener
|
Callback indicating that a ParcelFileDescriptor has been closed.
Summary
Public methods |
abstract
void
|
onClose(IOException e)
Event indicating the ParcelFileDescriptor to which this listener was
attached has been closed.
|
Public methods
onClose
public abstract void onClose (IOException e)
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nParcelFileDescriptor.OnCloseListener\n====================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/os/ParcelFileDescriptor.OnCloseListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nParcelFileDescriptor.OnCloseListener\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------|\n| android.os.ParcelFileDescriptor.OnCloseListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback indicating that a ParcelFileDescriptor has been closed.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onClose](/reference/android/os/ParcelFileDescriptor.OnCloseListener#onClose(java.io.IOException))`(`[IOException](/reference/java/io/IOException)` e) ` 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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onClose (IOException e)\n```\n\nEvent indicating the ParcelFileDescriptor to which this listener was\nattached has been closed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `e` | `IOException`: error state, or `null` if closed cleanly. If the close event was the result of [ParcelFileDescriptor.detachFd()](/reference/android/os/ParcelFileDescriptor#detachFd()), this will be a [FileDescriptorDetachedException](/reference/android/os/ParcelFileDescriptor.FileDescriptorDetachedException). After detach the remote side may continue reading/writing to the underlying [FileDescriptor](/reference/java/io/FileDescriptor), but they can no longer deliver reliable close/error events. \u003cbr /\u003e |"]]