Package org.springframework.batch.item.file.transform

# Class IncorrectLineLengthException

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.IncorrectLineLengthException

All Implemented Interfaces:
  `Serializable`

public class IncorrectLineLengthException extends FlatFileFormatException
Exception indicating that the line size expected is different from what is expected.

Since:
  1.1
Author:
  Lucas Ward, Michael Minella
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IncorrectLineLengthException(int expectedLength, int actualLength)`
  `IncorrectLineLengthException(int expectedLength, int actualLength, String input)`
  `IncorrectLineLengthException(String message, int expectedLength, int actualLength)`
  `IncorrectLineLengthException(String message, int expectedLength, int actualLength, String input)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getActualLength()`
  Retrieves the actual length that was recorded for this exception.
  `int`
  `getExpectedLength()`
  Retrieves the expected length that was recorded for this exception.

  ### Methods inherited from class org.springframework.batch.item.file.transform.FlatFileFormatException

  `getInput`

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

  - ### IncorrectLineLengthException

    public IncorrectLineLengthException(String message, int expectedLength, int actualLength, String input)
    Parameters:
      `message` - the message for this exception.
      `expectedLength` - int containing the length that was expected.
      `actualLength` - int containing the actual length.
      `input` - the `String` that contained the contents that caused the exception to be thrown.
    Since:
      2.2.6

  - ### IncorrectLineLengthException

    public IncorrectLineLengthException(String message, int expectedLength, int actualLength)
    Parameters:
      `message` - the message for this exception.
      `expectedLength` - int containing the length that was expected.
      `actualLength` - int containing the actual length.

  - ### IncorrectLineLengthException

    public IncorrectLineLengthException(int expectedLength, int actualLength, String input)
    Parameters:
      `expectedLength` - int containing the length that was expected.
      `actualLength` - int containing the actual length.
      `input` - the `String` that contained the contents that caused the exception to be thrown.
    Since:
      2.2.6

  - ### IncorrectLineLengthException

    public IncorrectLineLengthException(int expectedLength, int actualLength)
    Parameters:
      `expectedLength` - int containing the length that was expected.
      `actualLength` - int containing the actual length.

- ## Method Details

  - ### getActualLength

    public int getActualLength()
    Retrieves the actual length that was recorded for this exception.
    Returns:
      int containing the actual length.

  - ### getExpectedLength

    public int getExpectedLength()
    Retrieves the expected length that was recorded for this exception.
    Returns:
      int containing the expected length.