public class SpecificDatumWriter<T> extends GenericDatumWriter<T>
DatumWriter
for generated Java
classes.Modifier | Constructor and Description |
---|---|
|
SpecificDatumWriter() |
|
SpecificDatumWriter(Class<T> c) |
|
SpecificDatumWriter(Schema schema) |
|
SpecificDatumWriter(Schema root,
SpecificData specificData) |
protected |
SpecificDatumWriter(SpecificData specificData) |
Modifier and Type | Method and Description |
---|---|
SpecificData |
getSpecificData()
Returns the
SpecificData implementation used by this writer. |
protected void |
writeEnum(Schema schema,
Object datum,
Encoder out)
Called to write an enum value.
|
protected void |
writeField(Object datum,
Schema.Field f,
Encoder out,
Object state)
Called to write a single field of a record.
|
protected void |
writeRecord(Schema schema,
Object datum,
Encoder out)
Called to write a record.
|
protected void |
writeString(Schema schema,
Object datum,
Encoder out)
Called to write a string.
|
addAvroTypeMsg, addClassCastMsg, convert, getArrayElements, getArraySize, getData, getMapEntries, getMapSize, npe, resolveUnion, setSchema, write, write, writeArray, writeBytes, writeFixed, writeMap, writeString, writeWithoutConversion
public SpecificDatumWriter()
public SpecificDatumWriter(Schema schema)
public SpecificDatumWriter(Schema root, SpecificData specificData)
protected SpecificDatumWriter(SpecificData specificData)
public SpecificData getSpecificData()
SpecificData
implementation used by this writer.protected void writeEnum(Schema schema, Object datum, Encoder out) throws IOException
GenericDatumWriter
writeEnum
in class GenericDatumWriter<T>
IOException
protected void writeString(Schema schema, Object datum, Encoder out) throws IOException
GenericDatumWriter
writeString
in class GenericDatumWriter<T>
IOException
protected void writeRecord(Schema schema, Object datum, Encoder out) throws IOException
GenericDatumWriter
writeRecord
in class GenericDatumWriter<T>
IOException
protected void writeField(Object datum, Schema.Field f, Encoder out, Object state) throws IOException
GenericDatumWriter
writeField
in class GenericDatumWriter<T>
IOException
Copyright © 2009–2022 The Apache Software Foundation. All rights reserved.