org.apache.avro.io
Class ParsingEncoder
java.lang.Object
   org.apache.avro.io.Encoder
org.apache.avro.io.Encoder
       org.apache.avro.io.ParsingEncoder
org.apache.avro.io.ParsingEncoder
- All Implemented Interfaces: 
- Flushable
- Direct Known Subclasses: 
- JsonEncoder, ValidatingEncoder
- public abstract class ParsingEncoder 
- extends Encoder
Base class for parser-based
 Encoders.
| Field Summary | 
| protected  int | pos
 | 
 
 
| Method Summary | 
| protected  int | depth()
 | 
| protected  void | pop()
 | 
| protected  void | push()Push a new collection on to the stack.
 | 
|  void | setItemCount(long itemCount)Call this method before writing a batch of items in an array or a map.
 | 
|  void | startItem()Start a new item of an array or map.
 | 
 
| Methods inherited from class org.apache.avro.io.Encoder | 
| writeArrayEnd, writeArrayStart, writeBoolean, writeBytes, writeBytes, writeBytes, writeDouble, writeEnum, writeFixed, writeFixed, writeFloat, writeIndex, writeInt, writeLong, writeMapEnd, writeMapStart, writeNull, writeString, writeString, writeString | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
pos
protected int pos
ParsingEncoder
public ParsingEncoder()
setItemCount
public void setItemCount(long itemCount)
                  throws IOException
- Description copied from class: Encoder
- Call this method before writing a batch of items in an array or a map.
 Then for each item, call Encoder.startItem()followed by any of the
 other write methods ofEncoder. The number of calls
 toEncoder.startItem()must be equal to the count specified
 inEncoder.setItemCount(long). Once a batch is completed you
 can start another batch withEncoder.setItemCount(long).
 
- 
- Specified by:
- setItemCountin class- Encoder
 
- 
- Parameters:
- itemCount- The number of- Encoder.startItem()calls to follow.
- Throws:
- IOException
 
startItem
public void startItem()
               throws IOException
- Description copied from class: Encoder
- Start a new item of an array or map.
 See Encoder.writeArrayStart()for usage information.
 
- 
- Specified by:
- startItemin class- Encoder
 
- 
- Throws:
- IOException
 
push
protected final void push()
- Push a new collection on to the stack.
 
- 
 
pop
protected final void pop()
- 
 
depth
protected final int depth()
- 
 
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.