Package com.google.android.exoplayer2.decoder

## Class DecoderInputBuffer.InsufficientCapacityException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - java.lang.IllegalStateException
        - - com.google.android.exoplayer2.decoder.DecoderInputBuffer.InsufficientCapacityException

- All Implemented Interfaces:
    `Serializable`
  Enclosing class:
    DecoderInputBuffer

      public static final class DecoderInputBuffer.InsufficientCapacityException
      extends IllegalStateException

  Thrown when an attempt is made to write into a `DecoderInputBuffer` whose `DecoderInputBuffer.bufferReplacementMode` is `DecoderInputBuffer.BUFFER_REPLACEMENT_MODE_DISABLED` and who `DecoderInputBuffer.data` capacity is smaller than required.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `int` | `currentCapacity` | The current capacity of the buffer.
    `int` | `requiredCapacity` | The required capacity of the buffer.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InsufficientCapacityException​(int currentCapacity, int requiredCapacity)` | Creates an instance.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### currentCapacity

          public final int currentCapacity

      The current capacity of the buffer.

    - #### requiredCapacity

          public final int requiredCapacity

      The required capacity of the buffer.

  - ### Constructor Detail

    - #### InsufficientCapacityException

          public InsufficientCapacityException​(int currentCapacity,
                                               int requiredCapacity)

      Creates an instance.
      Parameters:
        `currentCapacity` - The current capacity of the buffer.
        `requiredCapacity` - The required capacity of the buffer.