public abstract class ParsingEncoder extends Encoder
Modifier and Type | Field and Description |
---|---|
protected int |
pos |
Constructor and Description |
---|
ParsingEncoder() |
Modifier and Type | Method and Description |
---|---|
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.
|
writeArrayEnd, writeArrayStart, writeBoolean, writeBytes, writeBytes, writeBytes, writeDouble, writeEnum, writeFixed, writeFixed, writeFixed, writeFloat, writeIndex, writeInt, writeLong, writeMapEnd, writeMapStart, writeNull, writeString, writeString, writeString
public void setItemCount(long itemCount) throws IOException
Encoder
Encoder.startItem()
followed by any of the other write
methods of Encoder
. The number of calls to Encoder.startItem()
must
be equal to the count specified in Encoder.setItemCount(long)
. Once a batch is
completed you can start another batch with Encoder.setItemCount(long)
.setItemCount
in class Encoder
itemCount
- The number of Encoder.startItem()
calls to follow.IOException
public void startItem() throws IOException
Encoder
Encoder.writeArrayStart()
for usage
information.startItem
in class Encoder
IOException
protected final void push()
protected final void pop()
protected final int depth()
Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.