JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
javax.json

Interface JsonWriter

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      void close ()
      Closes this JSON writer and frees any resources associated with the writer.
      void write (JsonStructure value)
      Writes the specified JSON object or array to the output source.
      void writeArray (JsonArray array)
      Writes the specified JSON array to the output source.
      void writeObject (JsonObject object)
      Writes the specified JSON object to the output source.
    • Method Detail

      • writeArray

        void writeArray(JsonArray array)
        Writes the specified JSON array to the output source. This method needs to be called only once for a writer instance.
        Parameters:
        array - JSON array that is to be written to the output source
        Throws:
        JsonException - if the specified JSON object cannot be written due to i/o error (IOException would be cause of JsonException)
        IllegalStateException - if writeArray, writeObject, write or close method is already called
      • writeObject

        void writeObject(JsonObject object)
        Writes the specified JSON object to the output source. This method needs to be called only once for a writer instance.
        Parameters:
        object - JSON object that is to be written to the output source
        Throws:
        JsonException - if the specified JSON object cannot be written due to i/o error (IOException would be cause of JsonException)
        IllegalStateException - if writeArray, writeObject, write or close method is already called
      • write

        void write(JsonStructure value)
        Writes the specified JSON object or array to the output source. This method needs to be called only once for a writer instance.
        Parameters:
        value - JSON array or object that is to be written to the output source
        Throws:
        JsonException - if the specified JSON object cannot be written due to i/o error (IOException would be cause of JsonException)
        IllegalStateException - if writeArray, writeObject, write or close method is already called
      • close

        void close()
        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
        Throws:
        JsonException - if an i/o error occurs (IOException would be cause of JsonException)
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.

AltStyle によって変換されたページ (->オリジナル) /