org.apache.avro.io.parsing
Class SkipParser

java.lang.Object
  extended by org.apache.avro.io.parsing.Parser
      extended by org.apache.avro.io.parsing.SkipParser

public class SkipParser
extends Parser

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
static interface SkipParser.SkipHandler
          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
SkipParser(Symbol root, Parser.ActionHandler symbolHandler, SkipParser.SkipHandler skipHandler)
           
 
Method Summary
 void skipRepeater()
          Skips the repeater at the top the stack.
 void skipSymbol(Symbol symToSkip)
          Pushes the given symbol on to the skip and skips it.
 void skipTo(int target)
          Skips data by calling skipXyz or readXyz methods on this, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkipParser

public SkipParser(Symbol root,
                  Parser.ActionHandler symbolHandler,
                  SkipParser.SkipHandler skipHandler)
           throws IOException
Throws:
IOException
Method Detail

skipTo

public final void skipTo(int target)
                  throws IOException
Skips data by calling skipXyz or readXyz methods on this, until the parser stack reaches the target level.

Throws:
IOException

skipRepeater

public final void skipRepeater()
                        throws IOException
Skips the repeater at the top the stack.

Throws:
IOException

skipSymbol

public final void skipSymbol(Symbol symToSkip)
                      throws IOException
Pushes the given symbol on to the skip and skips it.

Parameters:
symToSkip - The symbol that should be skipped.
Throws:
IOException


Copyright © 2010 The Apache Software Foundation