Interface Handler
- All Known Subinterfaces:
PipelineComponent
- All Known Implementing Classes:
AbstractPipelineComponent,AllHandler,EnforceHandler,EscapeHandler,IsAlnumHandler,NoHandler,Pipeline,QuoteHandler,SeparatorHandler,TransparentHandler,UnquotedFieldAssembler,WhitespacesHandler
public interface Handler
Base contract for an object that decides whether and how to handle a single
character during CSV parsing.
- Since:
- 2.2 (Sep 12, 2004)
- Version:
- $Revision$ $Date$
- Author:
- fede, Last changed by: $Author$
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether this handler allows input to end at this point.booleancanHandle(char c) Determines whether this handler can handle the given character.voidhandle(char c) Handles the given character.voidNotifies this handler that no more input will be provided.
-
Method Details
-
handle
Handles the given character.- Parameters:
c- the character to handle.- Throws:
IllegalInputCharacterException- if the character is not valid in the current context.PipelineException- if the character cannot be processed by the pipeline.
-
canHandle
Determines 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.
-
noMoreInput
Notifies this handler that no more input will be provided.- Throws:
IllegalStateException- if this handler is not in a state where input can end.
-
allowForNoMoreInput
Determines whether this handler allows input to end at this point.- Returns:
trueif ending input now is allowed.- Throws:
IllegalStateException- if the handler's state cannot be evaluated.
-