org.springframework.batch.item.file.transform

## Class IncorrectTokenCountException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.springframework.batch.item.file.transform.FlatFileFormatException
        - - org.springframework.batch.item.file.transform.IncorrectTokenCountException

- All Implemented Interfaces:
    java.io.Serializable

      public class IncorrectTokenCountException
      extends FlatFileFormatException

  Exception indicating that an incorrect number of tokens have been found while parsing a file.
  Since:
    1.1
  Author:
    Lucas Ward, "Michael Minella"
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IncorrectTokenCountException(int expectedCount, int actualCount)`
    `IncorrectTokenCountException(int expectedCount, int actualCount, java.lang.String input)`
    `IncorrectTokenCountException(java.lang.String message, int expectedCount, int actualCount)`
    `IncorrectTokenCountException(java.lang.String message, int expectedCount, int actualCount, java.lang.String input)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getActualCount()`
    `int` | `getExpectedCount()`
    `java.lang.String` | `getInput()` Retrieve the input that caused this exception.

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

    - #### IncorrectTokenCountException

          public IncorrectTokenCountException(java.lang.String message,
                                              int expectedCount,
                                              int actualCount,
                                              java.lang.String input)

    - #### IncorrectTokenCountException

          public IncorrectTokenCountException(java.lang.String message,
                                              int expectedCount,
                                              int actualCount)

    - #### IncorrectTokenCountException

          public IncorrectTokenCountException(int expectedCount,
                                              int actualCount,
                                              java.lang.String input)

    - #### IncorrectTokenCountException

          public IncorrectTokenCountException(int expectedCount,
                                              int actualCount)

  - ### Method Detail

    - #### getActualCount

          public int getActualCount()

    - #### getExpectedCount

          public int getExpectedCount()

    - #### getInput

          public java.lang.String getInput()

      Description copied from class: `FlatFileFormatException`
      Retrieve the input that caused this exception.
      Overrides:
        `getInput` in class `FlatFileFormatException`
      Returns:
        the line that caused the exception
      Since:
        2.2.6