Class QuoteHandler
java.lang.Object
org.dbunit.dataset.common.handlers.AbstractPipelineComponent
org.dbunit.dataset.common.handlers.QuoteHandler
- All Implemented Interfaces:
Handler,PipelineComponent
PipelineComponent that matches the CSV quote character.- Since:
- 2.2 (Sep 12, 2004)
- Version:
- $Revision$ $Date$
- Author:
- fede, Last changed by: $Author$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classHelper that starts a quoted field, re-arranging the pipeline to accept characters literally until the closing quote.protected static classHelper that ends a quoted field, restoring the pipeline's pre-quote state.Nested classes/interfaces inherited from class org.dbunit.dataset.common.handlers.AbstractPipelineComponent
AbstractPipelineComponent.ACCEPT, AbstractPipelineComponent.IGNORE -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charThe character that delimits a quoted CSV field. -
Method Summary
Modifier and TypeMethodDescriptionstatic final PipelineComponentACCEPT()Creates a handler that accepts the quote character.booleancanHandle(char c) Determines whether this handler can handle the given character.static final PipelineComponentIGNORE()Creates a handler that ignores the quote character.static final PipelineComponentQUOTE()Creates a handler that starts a quoted field on the quote character.static final PipelineComponentUNQUOTE()Creates a handler that ends a quoted field on the quote character.Methods inherited from class org.dbunit.dataset.common.handlers.AbstractPipelineComponent
accept, allowForNoMoreInput, createPipelineComponent, getHelper, getPipeline, getPipelineConfig, getSuccessor, handle, noMoreInput, setPipeline, setSuccessor
-
Field Details
-
QUOTE_CHAR
public static final char QUOTE_CHARThe character that delimits a quoted CSV field.- See Also:
-
-
Method Details
-
ACCEPT
Creates a handler that accepts the quote character.- Returns:
- the new pipeline component.
-
IGNORE
Creates a handler that ignores the quote character.- Returns:
- the new pipeline component.
-
QUOTE
Creates a handler that starts a quoted field on the quote character.- Returns:
- the new pipeline component.
-
UNQUOTE
Creates a handler that ends a quoted field on the quote character.- Returns:
- the new pipeline component.
-
canHandle
Description copied from interface:HandlerDetermines whether this handler can handle the given character.- Parameters:
c- the character to check.- Returns:
trueif this handler can handle the character.- Throws:
IllegalInputCharacterException- if the character is not valid in the current context.
-