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 interface
GenericRecordXmlWriter.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 void
close()
protected void
closeName(String name)
protected static boolean
isComplex(Object obj)
static String
marshal(GenericRecord record)
static String
marshal(GenericRecord record, boolean withComments)
protected static boolean
matchInstanceOrArray(Class<?> key, Object instance)
protected void
openName(String name)
protected boolean
printAffineTransform(String name, Object o)
protected boolean
printAnnotatedFlag(String name, Object o)
protected boolean
printArray(String name, Object o)
protected boolean
printBoolean(String name, Object o)
protected boolean
printBufferedImage(String name, Object o)
protected boolean
printBytes(String name, Object o)
protected boolean
printColor(String name, Object o)
protected boolean
printDimension(String name, Object o)
protected void
printGenericRecord(String name, Object value)
protected boolean
printList(String name, Object o)
protected boolean
printNumber(String name, Object o)
protected boolean
printObject(String name, Object o)
protected boolean
printPath(String name, Object o)
protected boolean
printPoint(String name, Object o)
protected boolean
printRectangle(String name, Object o)
void
setWithComments(boolean withComments)
protected String
tabs()
protected String
trimHex(long l, int size)
protected void
write(String name, GenericRecord record)
void
write(GenericRecord record)
protected boolean
writeChildren(GenericRecord record, boolean hasComplexProperties)
void
writeError(String errorMsg)
protected Stream<Map.Entry<String,Supplier<?>>>
writeProp(Map.Entry<String,Supplier<?>> me)
protected boolean
writeProperties(GenericRecord record)
protected void
writeValue(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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)
-
-