public class GenericRecordXmlWriter
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
protected static interface |
GenericRecordXmlWriter.GenericRecordHandler |
Constructor and Description |
---|
GenericRecordXmlWriter(java.lang.Appendable buffer) |
GenericRecordXmlWriter(java.io.File fileName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
closeName(java.lang.String name) |
protected static boolean |
isComplex(java.lang.Object obj) |
static java.lang.String |
marshal(GenericRecord record) |
static java.lang.String |
marshal(GenericRecord record,
boolean withComments) |
protected static boolean |
matchInstanceOrArray(java.lang.Class key,
java.lang.Object instance) |
protected void |
openName(java.lang.String name) |
protected boolean |
printAffineTransform(java.lang.String name,
java.lang.Object o) |
protected boolean |
printAnnotatedFlag(java.lang.String name,
java.lang.Object o) |
protected boolean |
printArray(java.lang.String name,
java.lang.Object o) |
protected boolean |
printBoolean(java.lang.String name,
java.lang.Object o) |
protected boolean |
printBufferedImage(java.lang.String name,
java.lang.Object o) |
protected boolean |
printBytes(java.lang.String name,
java.lang.Object o) |
protected boolean |
printColor(java.lang.String name,
java.lang.Object o) |
protected boolean |
printDimension(java.lang.String name,
java.lang.Object o) |
protected void |
printGenericRecord(java.lang.String name,
java.lang.Object value) |
protected boolean |
printList(java.lang.String name,
java.lang.Object o) |
protected boolean |
printNumber(java.lang.String name,
java.lang.Object o) |
protected boolean |
printObject(java.lang.String name,
java.lang.Object o) |
protected boolean |
printPath(java.lang.String name,
java.lang.Object o) |
protected boolean |
printPoint(java.lang.String name,
java.lang.Object o) |
protected boolean |
printRectangle(java.lang.String name,
java.lang.Object o) |
void |
setWithComments(boolean withComments) |
protected java.lang.String |
tabs() |
protected java.lang.String |
trimHex(long l,
int size) |
void |
write(GenericRecord record) |
protected void |
write(java.lang.String name,
GenericRecord record) |
protected boolean |
writeChildren(GenericRecord record,
boolean hasComplexProperties) |
void |
writeError(java.lang.String errorMsg) |
protected java.util.stream.Stream<java.util.Map.Entry<java.lang.String,java.util.function.Supplier<?>>> |
writeProp(java.util.Map.Entry<java.lang.String,java.util.function.Supplier<?>> me) |
protected boolean |
writeProperties(GenericRecord record) |
protected void |
writeValue(java.lang.String name,
java.lang.Object value) |
public GenericRecordXmlWriter(java.io.File fileName) throws java.io.IOException
java.io.IOException
public GenericRecordXmlWriter(java.lang.Appendable buffer)
public static java.lang.String marshal(GenericRecord record)
public static java.lang.String marshal(GenericRecord record, boolean withComments)
public void setWithComments(boolean withComments)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
protected java.lang.String tabs()
public void write(GenericRecord record)
protected void write(java.lang.String name, GenericRecord record)
protected boolean writeProperties(GenericRecord record)
protected boolean writeChildren(GenericRecord record, boolean hasComplexProperties)
public void writeError(java.lang.String errorMsg)
protected java.util.stream.Stream<java.util.Map.Entry<java.lang.String,java.util.function.Supplier<?>>> writeProp(java.util.Map.Entry<java.lang.String,java.util.function.Supplier<?>> me)
protected static boolean isComplex(java.lang.Object obj)
protected void writeValue(java.lang.String name, java.lang.Object value)
protected static boolean matchInstanceOrArray(java.lang.Class key, java.lang.Object instance)
protected void openName(java.lang.String name)
protected void closeName(java.lang.String name)
protected boolean printNumber(java.lang.String name, java.lang.Object o)
protected boolean printBoolean(java.lang.String name, java.lang.Object o)
protected boolean printList(java.lang.String name, java.lang.Object o)
protected boolean printArray(java.lang.String name, java.lang.Object o)
protected void printGenericRecord(java.lang.String name, java.lang.Object value)
protected boolean printAnnotatedFlag(java.lang.String name, java.lang.Object o)
protected boolean printBytes(java.lang.String name, java.lang.Object o)
protected boolean printPoint(java.lang.String name, java.lang.Object o)
protected boolean printDimension(java.lang.String name, java.lang.Object o)
protected boolean printRectangle(java.lang.String name, java.lang.Object o)
protected boolean printPath(java.lang.String name, java.lang.Object o)
protected boolean printObject(java.lang.String name, java.lang.Object o)
protected boolean printAffineTransform(java.lang.String name, java.lang.Object o)
protected boolean printColor(java.lang.String name, java.lang.Object o)
protected boolean printBufferedImage(java.lang.String name, java.lang.Object o)
protected java.lang.String trimHex(long l, int size)
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.