oracle.dbtools.plugin.api.json

## Interface JSONReader

- All Superinterfaces:
    AutoCloseable, Closeable, Iterator<JSONToken>

      public interface JSONReader
      extends Iterator<JSONToken>, Closeable

  Reads a stream of `JSONToken` instances from an underlying character stream, using the `Iterator` pattern.
  Author:
    cdivilly

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()` Indicates if there any more `JSONToken`s in the stream.
    `JSONToken` | `next()` Returns the next `JSONToken` in the stream.
    `void` | `remove()` Deprecated.

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Method Detail

    - #### hasNext

          boolean hasNext()
                   throws JSONIOException

      Indicates if there any more `JSONToken`s in the stream.
      Specified by:
        `hasNext` in interface `Iterator<JSONToken>`
      Returns:
        true if there are more tokens, false if the end of the stream has been reached
      Throws:
        `JSONIOException` - if an `IOException` is raised by the underlying stream

    - #### next

          JSONToken next()
                  throws JSONIOException

      Returns the next `JSONToken` in the stream.
      Specified by:
        `next` in interface `Iterator<JSONToken>`
      Returns:
        `JSONToken` instance or null if the end of the stream has been reached.
      Throws:
        `JSONIOException` - if an `IOException` is raised by the underlying stream

    - #### remove

          @Deprecated
          void remove()
                           throws IllegalStateException

      Deprecated.
      This operation is not supported on `JSONReader` instances.
      Specified by:
        `remove` in interface `Iterator<JSONToken>`
      Throws:
        `IllegalStateException` - if this method is invoked

Copyright © 2010, 2022, Oracle and/or its affiliates.