Package 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:
  `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
  Description
  `IncorrectTokenCountException(int expectedCount, int actualCount)`
  `IncorrectTokenCountException(int expectedCount, int actualCount, String input)`
  `IncorrectTokenCountException(String message, int expectedCount, int actualCount)`
  `IncorrectTokenCountException(String message, int expectedCount, int actualCount, String input)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getActualCount()`
  `int`
  `getExpectedCount()`
  `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 Details

  - ### IncorrectTokenCountException

    public IncorrectTokenCountException(String message, int expectedCount, int actualCount, String input)

  - ### IncorrectTokenCountException

    public IncorrectTokenCountException(String message, int expectedCount, int actualCount)

  - ### IncorrectTokenCountException

    public IncorrectTokenCountException(int expectedCount, int actualCount, String input)

  - ### IncorrectTokenCountException

    public IncorrectTokenCountException(int expectedCount, int actualCount)

- ## Method Details

  - ### getActualCount

    public int getActualCount()

  - ### getExpectedCount

    public int getExpectedCount()

  - ### getInput

    public 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