org.apache.commons.io

## Class IOIndexedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - org.apache.commons.io.IOIndexedException

- All Implemented Interfaces:
    Serializable

      public class IOIndexedException
      extends IOException

  A IOException associated with a source index.
  Since:
    2.7
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IOIndexedException(int index, Throwable cause)` Creates a new exception.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getIndex()` The index of this exception.
    `protected static String` | `toMessage(int index, Throwable cause)` Converts input to a suitable String for exception message.

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

- - ### Constructor Detail

    - #### IOIndexedException

          public IOIndexedException(int index,
                                    Throwable cause)

      Creates a new exception.
      Parameters:
        `index` - index of this exception.
        `cause` - cause exceptions.

  - ### Method Detail

    - #### toMessage

          protected static String toMessage(int index,
                                            Throwable cause)

      Converts input to a suitable String for exception message.
      Parameters:
        `index` - An index into a source collection.
        `cause` - A cause.
      Returns:
        A message.

    - #### getIndex

          public int getIndex()

      The index of this exception.
      Returns:
        index of this exception.

Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.