public final class CsvDecoder
extends org.apache.avro.io.ParsingDecoder
| Constructor and Description |
|---|
CsvDecoder(CsvReader csvReader,
org.apache.avro.Schema readerSchema) |
| Modifier and Type | Method and Description |
|---|---|
long |
arrayNext() |
org.apache.avro.io.parsing.Symbol |
doAction(org.apache.avro.io.parsing.Symbol symbol,
org.apache.avro.io.parsing.Symbol symbol1) |
long |
mapNext() |
long |
readArrayStart() |
boolean |
readBoolean() |
ByteBuffer |
readBytes(ByteBuffer bb) |
double |
readDouble() |
int |
readEnum() |
void |
readFixed(byte[] bytes,
int i,
int nrBytes) |
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 utf8) |
long |
skipArray() |
void |
skipBytes() |
protected void |
skipFixed() |
void |
skipFixed(int i) |
void |
skipHeader() |
long |
skipMap() |
void |
skipString() |
String |
toString() |
static DecodedSchema |
tryDecodeSchema(InputStream is,
org.apache.avro.Schema readerSchema)
Will try to decode the writer schema based on the csv headers, and the reader schema.
|
public CsvDecoder(CsvReader csvReader, org.apache.avro.Schema readerSchema) throws IOException
IOExceptionpublic void skipHeader()
throws IOException,
CsvParseException
IOExceptionCsvParseExceptionpublic void readNull()
throws IOException
readNull in class org.apache.avro.io.DecoderIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in class org.apache.avro.io.DecoderIOExceptionpublic int readInt()
throws IOException
readInt in class org.apache.avro.io.DecoderIOExceptionpublic long readLong()
throws IOException
readLong in class org.apache.avro.io.DecoderIOExceptionpublic float readFloat()
throws IOException
readFloat in class org.apache.avro.io.DecoderIOExceptionpublic double readDouble()
throws IOException
readDouble in class org.apache.avro.io.DecoderIOExceptionpublic org.apache.avro.util.Utf8 readString(org.apache.avro.util.Utf8 utf8)
throws IOException
readString in class org.apache.avro.io.DecoderIOExceptionpublic String readString() throws IOException
readString in class org.apache.avro.io.DecoderIOExceptionpublic void skipString()
throws IOException
skipString in class org.apache.avro.io.DecoderIOExceptionpublic ByteBuffer readBytes(ByteBuffer bb) throws IOException
readBytes in class org.apache.avro.io.DecoderIOExceptionpublic void skipBytes()
throws IOException
skipBytes in class org.apache.avro.io.DecoderIOExceptionpublic void readFixed(byte[] bytes,
int i,
int nrBytes)
throws IOException
readFixed in class org.apache.avro.io.DecoderIOExceptionpublic void skipFixed(int i)
throws IOException
skipFixed in class org.apache.avro.io.DecoderIOExceptionpublic int readEnum()
throws IOException
readEnum in class org.apache.avro.io.DecoderIOExceptionpublic long readArrayStart()
throws IOException
readArrayStart in class org.apache.avro.io.DecoderIOExceptionpublic long arrayNext()
throws IOException
arrayNext in class org.apache.avro.io.DecoderIOExceptionpublic long skipArray()
throws IOException
skipArray in class org.apache.avro.io.DecoderIOExceptionpublic long readMapStart()
readMapStart in class org.apache.avro.io.Decoderpublic long mapNext()
mapNext in class org.apache.avro.io.Decoderpublic long skipMap()
skipMap in class org.apache.avro.io.Decoderpublic int readIndex()
throws IOException
readIndex in class org.apache.avro.io.DecoderIOExceptionprotected void skipFixed()
throws IOException
skipFixed in class org.apache.avro.io.ParsingDecoderIOException@Nullable public org.apache.avro.io.parsing.Symbol doAction(org.apache.avro.io.parsing.Symbol symbol, org.apache.avro.io.parsing.Symbol symbol1)
public static DecodedSchema tryDecodeSchema(InputStream is, @Nullable org.apache.avro.Schema readerSchema) throws IOException
is - readerSchema - IOExceptionCopyright © 2019 SPF4J. All rights reserved.