Class JsonWriterImpl

java.lang.Object
org.glassfish.json.JsonWriterImpl
All Implemented Interfaces:
Closeable, AutoCloseable, JsonWriter

class JsonWriterImpl extends Object implements JsonWriter
JsonWriter impl using generator.
  • Field Details

  • Constructor Details

  • Method Details

    • writeArray

      public void writeArray(JsonArray array)
      Description copied from interface: JsonWriter
      Writes the specified JSON array to the output source. This method needs to be called only once for a writer instance.
      Specified by:
      writeArray in interface JsonWriter
      Parameters:
      array - JSON array that is to be written to the output source
    • writeObject

      public void writeObject(JsonObject object)
      Description copied from interface: JsonWriter
      Writes the specified JSON object to the output source. This method needs to be called only once for a writer instance.
      Specified by:
      writeObject in interface JsonWriter
      Parameters:
      object - JSON object that is to be written to the output source
    • write

      public void write(JsonStructure value)
      Description copied from interface: JsonWriter
      Writes the specified JSON object or array to the output source. This method needs to be called only once for a writer instance.
      Specified by:
      write in interface JsonWriter
      Parameters:
      value - JSON array or object that is to be written to the output source
    • close

      public void close()
      Description copied from interface: JsonWriter
      Closes this JSON writer and frees any resources associated with the writer. This method closes the underlying output source.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface JsonWriter