Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# ParcelFileDescriptor.OnCloseListener

*** ** * ** ***

` public static interface ParcelFileDescriptor.OnCloseListener `   
` `

|---|
| android.os.ParcelFileDescriptor.OnCloseListener |

<br />

*** ** * ** ***

Callback indicating that a ParcelFileDescriptor has been closed.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/os/ParcelFileDescriptor.OnCloseListener#onClose(java.io.IOException)(https://developer.android.com/reference/java/io/IOException e) ` Event indicating the ParcelFileDescriptor to which this listener was attached has been closed. |

## Public methods

### onClose

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void onClose (IOException e)
```

Event indicating the ParcelFileDescriptor to which this listener was attached has been closed.

<br />

| Parameters ||
|---|---|
| `e` | `IOException`: error state, or `null` if closed cleanly. If the close event was the result of `https://developer.android.com/reference/android/os/ParcelFileDescriptor#detachFd()`, this will be a `https://developer.android.com/reference/android/os/ParcelFileDescriptor.FileDescriptorDetachedException`. After detach the remote side may continue reading/writing to the underlying `https://developer.android.com/reference/java/io/FileDescriptor`, but they can no longer deliver reliable close/error events. <br /> |