Package org.apache.avro.io.parsing
Class SkipParser
java.lang.Object
org.apache.avro.io.parsing.Parser
org.apache.avro.io.parsing.SkipParser
A parser that capable of skipping as well read and write. This class is used
by decoders who (unlink encoders) are required to implement methods to skip.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The clients implement this interface to skip symbols and actions.Nested classes/interfaces inherited from class org.apache.avro.io.parsing.Parser
Parser.ActionHandler
-
Field Summary
Fields inherited from class org.apache.avro.io.parsing.Parser
pos, stack, symbolHandler
-
Constructor Summary
ConstructorDescriptionSkipParser
(Symbol root, Parser.ActionHandler symbolHandler, SkipParser.SkipHandler skipHandler) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Skips the repeater at the top the stack.final void
skipSymbol
(Symbol symToSkip) Pushes the given symbol on to the skip and skips it.final void
skipTo
(int target) Skips data by callingskipXyz
orreadXyz
methods onthis
, until the parser stack reaches the target level.Methods inherited from class org.apache.avro.io.parsing.Parser
advance, depth, popSymbol, processImplicitActions, processTrailingImplicitActions, pushProduction, pushSymbol, reset, topSymbol
-
Constructor Details
-
SkipParser
public SkipParser(Symbol root, Parser.ActionHandler symbolHandler, SkipParser.SkipHandler skipHandler) throws IOException - Throws:
IOException
-
-
Method Details
-
skipTo
Skips data by callingskipXyz
orreadXyz
methods onthis
, until the parser stack reaches the target level.- Throws:
IOException
-
skipRepeater
Skips the repeater at the top the stack.- Throws:
IOException
-
skipSymbol
Pushes the given symbol on to the skip and skips it.- Parameters:
symToSkip
- The symbol that should be skipped.- Throws:
IOException
-