Class GenericRecordJsonWriter

java.lang.Object
org.docx4j.org.apache.poi.util.GenericRecordJsonWriter
All Implemented Interfaces:
Closeable, AutoCloseable

@Beta public class GenericRecordJsonWriter extends Object implements Closeable
  • Field Details

    • aw

      protected final org.docx4j.org.apache.poi.util.GenericRecordJsonWriter.AppendableWriter aw
    • fw

      protected final PrintWriter fw
    • indent

      protected int indent
    • withComments

      protected boolean withComments
    • childIndex

      protected int childIndex
  • Constructor Details

    • GenericRecordJsonWriter

      public GenericRecordJsonWriter(File fileName) throws IOException
      Throws:
      IOException
    • GenericRecordJsonWriter

      public GenericRecordJsonWriter(Appendable buffer)
  • Method Details

    • 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 interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • tabs

      protected String tabs()
    • write

      public void write(GenericRecord record)
    • writeProperties

      protected boolean writeProperties(GenericRecord record)
    • writeChildren

      protected boolean writeChildren(GenericRecord record, boolean hasProperties)
    • writeError

      public void writeError(String errorMsg)
    • writeProp

      protected boolean writeProp(String name, Supplier<?> value)
    • writeValue

      protected boolean writeValue(String name, Object o)
    • matchInstanceOrArray

      protected static boolean matchInstanceOrArray(Class<?> key, Object instance)
    • printName

      protected void printName(String name)
    • printNull

      protected boolean printNull(String name, Object o)
    • printNumber

      protected boolean printNumber(String name, Object o)
    • printBoolean

      protected boolean printBoolean(String name, Object o)
    • printList

      protected boolean printList(String name, Object o)
    • printGenericRecord

      protected boolean printGenericRecord(String name, Object o)
    • printAnnotatedFlag

      protected boolean printAnnotatedFlag(String name, Object o)
    • printBytes

      protected boolean printBytes(String name, Object o)
    • printPoint

      protected boolean printPoint(String name, Object o)
    • printDimension

      protected boolean printDimension(String name, Object o)
    • printRectangle

      protected boolean printRectangle(String name, Object o)
    • printPath

      protected boolean printPath(String name, Object o)
    • printObject

      protected boolean printObject(String name, Object o)
    • printAffineTransform

      protected boolean printAffineTransform(String name, Object o)
    • printColor

      protected boolean printColor(String name, Object o)
    • printArray

      protected boolean printArray(String name, Object o)
    • printImage

      protected boolean printImage(String name, Object o)