public class ReflectDatumWriter<T> extends SpecificDatumWriter<T>
DatumWriter
for existing classes via
Java reflection.Modifier | Constructor and Description |
---|---|
|
ReflectDatumWriter() |
|
ReflectDatumWriter(Class<T> c) |
|
ReflectDatumWriter(Class<T> c,
ReflectData data) |
protected |
ReflectDatumWriter(ReflectData reflectData) |
|
ReflectDatumWriter(Schema root) |
|
ReflectDatumWriter(Schema root,
ReflectData reflectData) |
Modifier and Type | Method and Description |
---|---|
protected void |
write(Schema schema,
Object datum,
Encoder out)
Called to write data.
|
protected void |
writeArray(Schema schema,
Object datum,
Encoder out)
Called to write a array.
|
protected void |
writeBytes(Object datum,
Encoder out)
Called to write a bytes.
|
protected void |
writeField(Object record,
Schema.Field f,
Encoder out,
Object state)
Called to write a single field of a record.
|
getSpecificData, writeEnum, writeRecord, writeString
convert, getArrayElements, getArraySize, getData, getMapEntries, getMapSize, npe, resolveUnion, setSchema, write, writeFixed, writeMap, writeString, writeWithoutConversion
public ReflectDatumWriter()
public ReflectDatumWriter(Class<T> c, ReflectData data)
public ReflectDatumWriter(Schema root)
public ReflectDatumWriter(Schema root, ReflectData reflectData)
protected ReflectDatumWriter(ReflectData reflectData)
protected void writeArray(Schema schema, Object datum, Encoder out) throws IOException
writeArray
in class GenericDatumWriter<T>
IOException
protected void writeBytes(Object datum, Encoder out) throws IOException
GenericDatumWriter
writeBytes
in class GenericDatumWriter<T>
IOException
protected void write(Schema schema, Object datum, Encoder out) throws IOException
GenericDatumWriter
write
in class GenericDatumWriter<T>
IOException
protected void writeField(Object record, Schema.Field f, Encoder out, Object state) throws IOException
GenericDatumWriter
writeField
in class SpecificDatumWriter<T>
IOException
Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.