Class JsonValueWriter

java.lang.Object
java.io.Writer
org.apache.johnzon.jsonb.extension.JsonValueWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable, Consumer<jakarta.json.JsonValue>

public class JsonValueWriter extends Writer implements Consumer<jakarta.json.JsonValue>
  • Field Details

    • result

      private jakarta.json.JsonValue result
    • fallbackOutput

      private StringBuilder fallbackOutput
  • Constructor Details

    • JsonValueWriter

      public JsonValueWriter()
  • Method Details

    • write

      public void write(char[] cbuf, int off, int len)
      Specified by:
      write in class Writer
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in class Writer
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class Writer
    • setResult

      @Deprecated public void setResult(jakarta.json.JsonValue result)
      Deprecated.
    • getResult

      public jakarta.json.JsonValue getResult()
    • getObject

      public jakarta.json.JsonObject getObject()
    • getArray

      public jakarta.json.JsonArray getArray()
    • accept

      public void accept(jakarta.json.JsonValue jsonValue)
      Specified by:
      accept in interface Consumer<jakarta.json.JsonValue>