# DecoderInputBuffer.InsufficientCapacityException

Artifact: [androidx.media3:media3-decoder](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/decoder/DecoderInputBuffer.java+class:androidx.media3.decoder.DecoderInputBuffer.InsufficientCapacityException)

*** ** * ** ***


```
class DecoderInputBuffer.InsufficientCapacityException : IllegalStateException
```

<br />

|---|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) |||
|   |   |   | ↳ | [java.lang.IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException.html) ||
|   |   |   |   | ↳ | [androidx.media3.decoder.DecoderInputBuffer.InsufficientCapacityException](https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException) |

*** ** * ** ***

Thrown when an attempt is made to write into a `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer` whose `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer#bufferReplacementMode()` is `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer#BUFFER_REPLACEMENT_MODE_DISABLED()` and who `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer#data()` capacity is smaller than required.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#InsufficientCapacityException(int,int)( currentCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, requiredCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Creates an instance. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#currentCapacity()` The current capacity of the buffer. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#requiredCapacity()` The required capacity of the buffer. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### InsufficientCapacityException

```
InsufficientCapacityException(
    currentCapacity: Int,
    requiredCapacity: Int
)
```

Creates an instance.

| Parameters |
|---|---|
| `currentCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current capacity of the buffer. |
| `requiredCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The required capacity of the buffer. |

## Public properties

### currentCapacity

```
val currentCapacity: Int
```

The current capacity of the buffer.

### requiredCapacity

```
val requiredCapacity: Int
```

The required capacity of the buffer.