Class GenericRecordJsonWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    @Beta
    public class GenericRecordJsonWriter
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Detail

      • GenericRecordJsonWriter

        public GenericRecordJsonWriter​(java.io.File fileName)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • GenericRecordJsonWriter

        public GenericRecordJsonWriter​(java.lang.Appendable buffer)
    • Method Detail

      • marshal

        public static java.lang.String marshal​(GenericRecord record)
      • marshal

        public static java.lang.String marshal​(GenericRecord record,
                                               boolean withComments)
      • setWithComments

        public void setWithComments​(boolean withComments)
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • writeError

        public void writeError​(java.lang.String errorMsg)