# 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)

*** ** * ** ***


```
public final class DecoderInputBuffer.InsufficientCapacityException extends IllegalStateException
```

<br />

|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.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/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException) |

*** ** * ** ***

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

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#currentCapacity()` The current capacity of the buffer. |
| `final int` | `https://developer.android.com/reference/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#requiredCapacity()` The required capacity of the buffer. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException#InsufficientCapacityException(int,int)( int currentCapacity, int requiredCapacity )` Creates an instance. |

### Inherited methods

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html exception)` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `synchronized 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#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `StackTraceElement[]` `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `synchronized final Throwable[]` `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] stackTrace)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Public fields

### currentCapacity

```
public final int currentCapacity
```

The current capacity of the buffer.

### requiredCapacity

```
public final int requiredCapacity
```

The required capacity of the buffer.

## Public constructors

### InsufficientCapacityException

```
public InsufficientCapacityException(
    int currentCapacity,
    int requiredCapacity
)
```

Creates an instance.

| Parameters |
|---|---|
| `int currentCapacity` | The current capacity of the buffer. |
| `int requiredCapacity` | The required capacity of the buffer. |