public class DecoderOverAvroParser
extends org.apache.avro.io.Decoder
Decoder
Modifier and Type | Field and Description |
---|---|
protected AvroParserImpl |
_parser |
Constructor and Description |
---|
DecoderOverAvroParser(AvroParserImpl parser) |
Modifier and Type | Method and Description |
---|---|
long |
arrayNext() |
protected com.fasterxml.jackson.core.JsonToken |
consumeToken(com.fasterxml.jackson.core.JsonToken... expectedTokens)
Reads in the next value token from the parser and validates that it's one of the expected tokens
|
long |
mapNext() |
protected com.fasterxml.jackson.core.JsonToken |
nextUnionValue()
Advance to the next token that might contain union branching information; This effectively discards the virtual JSON tokens inserted
by the parser for
END_OBJECT , START_ARRAY , etc. |
protected com.fasterxml.jackson.core.JsonToken |
nextValue()
Advance to the next actual value token; This effectively discards the virtual JSON tokens inserted by the parser for
START_OBJECT , END_OBJECT , START_ARRAY , etc. |
long |
readArrayStart() |
boolean |
readBoolean() |
ByteBuffer |
readBytes(ByteBuffer old) |
double |
readDouble() |
int |
readEnum() |
void |
readFixed(byte[] bytes,
int start,
int length) |
float |
readFloat() |
int |
readIndex() |
int |
readInt() |
long |
readLong() |
long |
readMapStart() |
void |
readNull() |
String |
readString() |
org.apache.avro.util.Utf8 |
readString(org.apache.avro.util.Utf8 old) |
long |
skipArray() |
void |
skipBytes() |
void |
skipFixed(int length) |
long |
skipMap() |
void |
skipString() |
protected final AvroParserImpl _parser
public DecoderOverAvroParser(AvroParserImpl parser)
protected com.fasterxml.jackson.core.JsonToken consumeToken(com.fasterxml.jackson.core.JsonToken... expectedTokens) throws IOException
expectedTokens
- List of token types that is expectedIOException
- If there is an error while reading the next tokenIllegalArgumentException
- If the next token is not one of the expectedTokens
protected com.fasterxml.jackson.core.JsonToken nextValue() throws IOException
START_OBJECT
, END_OBJECT
, START_ARRAY
, etc. that are not actually present in the underlying
data stream and stops after reading the first token that represents actual dataIOException
- If there is an error while reading the next tokenprotected com.fasterxml.jackson.core.JsonToken nextUnionValue() throws IOException
END_OBJECT
, START_ARRAY
, etc. that are not actually present in the underlying data
stream and stops after reading the first token that represents actual data. START_OBJECT
is not skipped because union
information is only available at the start of an object, and has been discarded by the parser by the time we reach the next actual
value.IOException
- If there is an error while reading the next tokenpublic void readNull() throws IOException
readNull
in class org.apache.avro.io.Decoder
IOException
public boolean readBoolean() throws IOException
readBoolean
in class org.apache.avro.io.Decoder
IOException
public int readInt() throws IOException
readInt
in class org.apache.avro.io.Decoder
IOException
public long readLong() throws IOException
readLong
in class org.apache.avro.io.Decoder
IOException
public float readFloat() throws IOException
readFloat
in class org.apache.avro.io.Decoder
IOException
public double readDouble() throws IOException
readDouble
in class org.apache.avro.io.Decoder
IOException
public org.apache.avro.util.Utf8 readString(org.apache.avro.util.Utf8 old) throws IOException
readString
in class org.apache.avro.io.Decoder
IOException
public String readString() throws IOException
readString
in class org.apache.avro.io.Decoder
IOException
public void skipString() throws IOException
skipString
in class org.apache.avro.io.Decoder
IOException
public ByteBuffer readBytes(ByteBuffer old) throws IOException
readBytes
in class org.apache.avro.io.Decoder
IOException
public void skipBytes() throws IOException
skipBytes
in class org.apache.avro.io.Decoder
IOException
public void readFixed(byte[] bytes, int start, int length) throws IOException
readFixed
in class org.apache.avro.io.Decoder
IOException
public void skipFixed(int length) throws IOException
skipFixed
in class org.apache.avro.io.Decoder
IOException
public int readEnum() throws IOException
readEnum
in class org.apache.avro.io.Decoder
IOException
public long readArrayStart() throws IOException
readArrayStart
in class org.apache.avro.io.Decoder
IOException
public long arrayNext() throws IOException
arrayNext
in class org.apache.avro.io.Decoder
IOException
public long skipArray() throws IOException
skipArray
in class org.apache.avro.io.Decoder
IOException
public long readMapStart() throws IOException
readMapStart
in class org.apache.avro.io.Decoder
IOException
public long mapNext() throws IOException
mapNext
in class org.apache.avro.io.Decoder
IOException
public long skipMap() throws IOException
skipMap
in class org.apache.avro.io.Decoder
IOException
public int readIndex() throws IOException
readIndex
in class org.apache.avro.io.Decoder
IOException
Copyright © 2020 FasterXML. All rights reserved.