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, writeStringpublic void setItemCount(long itemCount)
throws IOException
EncoderEncoder.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 EncoderitemCount - The number of Encoder.startItem() calls to follow.IOExceptionpublic void startItem()
throws IOException
EncoderEncoder.writeArrayStart() for usage
information.startItem in class EncoderIOExceptionprotected final void push()
protected final void pop()
protected final int depth()
Copyright © 2009–2023 The Apache Software Foundation. All rights reserved.