com.holonplatform.json.internal

## Class DefaultJsonReader

- java.lang.Object
- - com.holonplatform.json.internal.DefaultJsonReader

- All Implemented Interfaces:
    JsonReader

      public class DefaultJsonReader
      extends Object
      implements JsonReader

  Default `JsonReader` implementation.
  Since:
    5.1.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultJsonReader(byte[] bytes)` Constructor using a byte array.
    `DefaultJsonReader(InputStream stream)` Constructor using an `InputStream` and default UTF-8 encoding.
    `DefaultJsonReader(InputStream stream, Charset charset)` Constructor using an `InputStream`.
    `DefaultJsonReader(InputStream stream, String charsetName)` Constructor using an `InputStream`.
    `DefaultJsonReader(Reader reader)` Constructor using a generic `Reader`.
    `DefaultJsonReader(String string)` Constructor using a String.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Reader` | `getReader()` Get the `Reader` to read the JSON data.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.json.JsonReader

      `from, from, from, from, from, from`

- - ### Constructor Detail

    - #### DefaultJsonReader

          public DefaultJsonReader(InputStream stream)

      Constructor using an `InputStream` and default UTF-8 encoding.
      Parameters:
        `stream` - The JSON `InputStream`

    - #### DefaultJsonReader

          public DefaultJsonReader(InputStream stream,
                                   String charsetName)

      Constructor using an `InputStream`.
      Parameters:
        `stream` - The JSON `InputStream`
        `charsetName` - Encoding charset name

    - #### DefaultJsonReader

          public DefaultJsonReader(InputStream stream,
                                   Charset charset)

      Constructor using an `InputStream`.
      Parameters:
        `stream` - The JSON `InputStream`
        `charset` - Encoding charset (if `null`, default UTF-8 will be used)

    - #### DefaultJsonReader

          public DefaultJsonReader(byte[] bytes)

      Constructor using a byte array.
      Parameters:
        `bytes` - JSON bytes

    - #### DefaultJsonReader

          public DefaultJsonReader(String string)

      Constructor using a String.
      Parameters:
        `string` - JSON string

    - #### DefaultJsonReader

          public DefaultJsonReader(Reader reader)

      Constructor using a generic `Reader`.
      Parameters:
        `reader` - JSON Reader (not null)

  - ### Method Detail

    - #### getReader

          public Reader getReader()

      Description copied from interface: `JsonReader`
      Get the `Reader` to read the JSON data.
      Specified by:
        `getReader` in interface `JsonReader`
      Returns:
        the JSON data reader

Copyright © 2019 The Holon Platform. All rights reserved.