Package org.apache.poi.util
Class GenericRecordXmlWriter
- java.lang.Object
-
- org.apache.poi.util.GenericRecordXmlWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class GenericRecordXmlWriter extends Object implements Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceGenericRecordXmlWriter.GenericRecordHandler
-
Constructor Summary
Constructors Constructor Description GenericRecordXmlWriter(File fileName)GenericRecordXmlWriter(Appendable buffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voidcloseName(String name)protected static booleanisComplex(Object obj)static Stringmarshal(GenericRecord record)static Stringmarshal(GenericRecord record, boolean withComments)protected static booleanmatchInstanceOrArray(Class<?> key, Object instance)protected voidopenName(String name)protected booleanprintAffineTransform(String name, Object o)protected booleanprintAnnotatedFlag(String name, Object o)protected booleanprintArray(String name, Object o)protected booleanprintBoolean(String name, Object o)protected booleanprintBufferedImage(String name, Object o)protected booleanprintBytes(String name, Object o)protected booleanprintColor(String name, Object o)protected booleanprintDimension(String name, Object o)protected voidprintGenericRecord(String name, Object value)protected booleanprintList(String name, Object o)protected booleanprintNumber(String name, Object o)protected booleanprintObject(String name, Object o)protected booleanprintPath(String name, Object o)protected booleanprintPoint(String name, Object o)protected booleanprintRectangle(String name, Object o)voidsetWithComments(boolean withComments)protected Stringtabs()protected StringtrimHex(long l, int size)protected voidwrite(String name, GenericRecord record)voidwrite(GenericRecord record)protected booleanwriteChildren(GenericRecord record, boolean hasComplexProperties)voidwriteError(String errorMsg)protected Stream<Map.Entry<String,Supplier<?>>>writeProp(Map.Entry<String,Supplier<?>> me)protected booleanwriteProperties(GenericRecord record)protected voidwriteValue(String name, Object value)
-
-
-
Constructor Detail
-
GenericRecordXmlWriter
public GenericRecordXmlWriter(File fileName) throws IOException
- Throws:
IOException
-
GenericRecordXmlWriter
public GenericRecordXmlWriter(Appendable buffer)
-
-
Method Detail
-
marshal
public static String marshal(GenericRecord record)
-
marshal
public static String marshal(GenericRecord record, boolean withComments)
-
setWithComments
public void setWithComments(boolean withComments)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
tabs
protected String tabs()
-
write
public void write(GenericRecord record)
-
write
protected void write(String name, GenericRecord record)
-
writeProperties
protected boolean writeProperties(GenericRecord record)
-
writeChildren
protected boolean writeChildren(GenericRecord record, boolean hasComplexProperties)
-
writeError
public void writeError(String errorMsg)
-
writeProp
protected Stream<Map.Entry<String,Supplier<?>>> writeProp(Map.Entry<String,Supplier<?>> me)
-
isComplex
protected static boolean isComplex(Object obj)
-
openName
protected void openName(String name)
-
closeName
protected void closeName(String name)
-
trimHex
protected String trimHex(long l, int size)
-
-