Class EscapeHandler

java.lang.Object
org.dbunit.dataset.common.handlers.AbstractPipelineComponent
org.dbunit.dataset.common.handlers.EscapeHandler
All Implemented Interfaces:
Handler, PipelineComponent

public class EscapeHandler extends AbstractPipelineComponent
PipelineComponent that matches the CSV escape character.
Since:
2.2 (Sep 12, 2004)
Version:
$Revision$ $Date$
Author:
fede, Last changed by: $Author$
  • Field Details

    • DEFAULT_ESCAPE_CHAR

      public static final char DEFAULT_ESCAPE_CHAR
      Default character used to escape the quote and escape characters themselves.
      See Also:
  • Method Details

    • ACCEPT

      public static final PipelineComponent ACCEPT()
      Creates a handler that accepts the escape character.
      Returns:
      the new pipeline component.
    • IGNORE

      public static final PipelineComponent IGNORE()
      Creates a handler that ignores the escape character.
      Returns:
      the new pipeline component.
    • ESCAPE

      public static final PipelineComponent ESCAPE()
      Creates a handler that processes the escape character by enforcing the next character to be accepted literally.
      Returns:
      the new pipeline component.
    • canHandle

      public boolean canHandle(char c) throws IllegalInputCharacterException
      Description copied from interface: Handler
      Determines whether this handler can handle the given character.
      Parameters:
      c - the character to check.
      Returns:
      true if this handler can handle the character.
      Throws:
      IllegalInputCharacterException - if the character is not valid in the current context.