# IOException

Artifact: [androidx.datastore:datastore-core](https://developer.android.com/jetpack/androidx/releases/datastore) [View Source](https://cs.android.com/search?q=file:androidx/datastore/core/+class:androidx.datastore.core.IOException) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/datastore#1.2.0)

*** ** * ** ***


```
public class IOException extends Exception
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||
|   | ↳ | [kotlin.Exception](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-exception/index.html) ||
|   |   | ↳ | [androidx.datastore.core.IOException](https://developer.android.com/reference/androidx/datastore/core/IOException) |

Known direct subclasses [CorruptionException](https://developer.android.com/reference/androidx/datastore/core/CorruptionException)

|---|---|
| `https://developer.android.com/reference/androidx/datastore/core/CorruptionException` | A subclass of IOException that indicates that the file could not be de-serialized due to data format corruption. |

*** ** * ** ***

Common IOException to be defined in jvm and native code.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/datastore/core/IOException#IOException(kotlin.String)(https://developer.android.com/reference/java/lang/String.html message)` |
| `https://developer.android.com/reference/androidx/datastore/core/IOException#IOException(kotlin.String,kotlin.Throwable)(https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/java/lang/Throwable.html cause)` |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull String[]` `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.experimental/-experimental-native-api/index.html
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Public constructors

### IOException

```
public IOException(String message)
```

### IOException

```
public IOException(String message, Throwable cause)
```