Class JsonReaderImpl

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

    class JsonReaderImpl
    extends java.lang.Object
    implements JsonReader
    JsonReader impl using parser and builders.
    • Field Detail

      • readDone

        private boolean readDone
    • Constructor Detail

      • JsonReaderImpl

        JsonReaderImpl​(java.io.Reader reader,
                       BufferPool bufferPool)
      • JsonReaderImpl

        JsonReaderImpl​(java.io.InputStream in,
                       BufferPool bufferPool)
      • JsonReaderImpl

        JsonReaderImpl​(java.io.InputStream in,
                       java.nio.charset.Charset charset,
                       BufferPool bufferPool)
    • Method Detail

      • read

        public JsonStructure read()
        Description copied from interface: JsonReader
        Returns a JSON array or object that is represented in the input source. This method needs to be called only once for a reader instance.
        Specified by:
        read in interface JsonReader
        Returns:
        a JSON object or array
      • readObject

        public JsonObject readObject()
        Description copied from interface: JsonReader
        Returns a JSON object that is represented in the input source. This method needs to be called only once for a reader instance.
        Specified by:
        readObject in interface JsonReader
        Returns:
        a JSON object
      • readArray

        public JsonArray readArray()
        Description copied from interface: JsonReader
        Returns a JSON array that is represented in the input source. This method needs to be called only once for a reader instance.
        Specified by:
        readArray in interface JsonReader
        Returns:
        a JSON array
      • readValue

        public JsonValue readValue()
        Description copied from interface: JsonReader
        Returns a JSON value that is represented in the input source. This method needs to be called only once for a reader instance.
        Specified by:
        readValue in interface JsonReader
        Returns:
        a JSON value
      • close

        public void close()
        Description copied from interface: JsonReader
        Closes this reader and frees any resources associated with the reader. This method closes the underlying input source.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface JsonReader