@Beta public class GenericRecordJsonWriter extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
GenericRecordJsonWriter.GenericRecordHandler |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.poi.util.GenericRecordJsonWriter.AppendableWriter |
aw |
protected int |
childIndex |
protected PrintWriter |
fw |
protected int |
indent |
protected boolean |
withComments |
| Constructor and Description |
|---|
GenericRecordJsonWriter(Appendable buffer) |
GenericRecordJsonWriter(File fileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static String |
marshal(GenericRecord record) |
static String |
marshal(GenericRecord record,
boolean withComments) |
protected static boolean |
matchInstanceOrArray(Class<?> key,
Object instance) |
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 |
printBytes(String name,
Object o) |
protected boolean |
printColor(String name,
Object o) |
protected boolean |
printDimension(String name,
Object o) |
protected boolean |
printGenericRecord(String name,
Object o) |
protected boolean |
printImage(String name,
Object o) |
protected boolean |
printList(String name,
Object o) |
protected void |
printName(String name) |
protected boolean |
printNull(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() |
void |
write(GenericRecord record) |
protected boolean |
writeChildren(GenericRecord record,
boolean hasProperties) |
void |
writeError(String errorMsg) |
protected boolean |
writeProp(String name,
Supplier<?> value) |
protected boolean |
writeProperties(GenericRecord record) |
protected boolean |
writeValue(String name,
Object o) |
protected final org.apache.poi.util.GenericRecordJsonWriter.AppendableWriter aw
protected final PrintWriter fw
protected int indent
protected boolean withComments
protected int childIndex
public GenericRecordJsonWriter(File fileName) throws IOException
IOExceptionpublic GenericRecordJsonWriter(Appendable buffer)
public static String marshal(GenericRecord record)
public static String marshal(GenericRecord record, boolean withComments)
public void setWithComments(boolean withComments)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected String tabs()
public void write(GenericRecord record)
protected boolean writeProperties(GenericRecord record)
protected boolean writeChildren(GenericRecord record, boolean hasProperties)
public void writeError(String errorMsg)
protected void printName(String name)