org.apache.synapse.commons.staxon.core.json.stream.util

## Class StreamSourceDelegate

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.json.stream.util.StreamSourceDelegate

- All Implemented Interfaces:
    Closeable, AutoCloseable, Location, JsonStreamSource
  Direct Known Subclasses:
    AddRootSource

      public class StreamSourceDelegate
      extends Object
      implements JsonStreamSource

  Delegating stream source.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource

      `JsonStreamSource.Value`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource

      `FALSE, NULL, TRUE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamSourceDelegate(JsonStreamSource delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `copy(JsonStreamTarget target)` Copy events to given target until `peek() == JsonStreamToken.NONE`.
    `void` | `endArray()` Consume `JsonStreamToken.END_ARRAY` token.
    `void` | `endObject()` Consume `JsonStreamToken.END_OBJECT` token.
    `int` | `getCharacterOffset()`
    `int` | `getColumnNumber()`
    `int` | `getLineNumber()`
    `String` | `getPublicId()`
    `String` | `getSystemId()`
    `String` | `name()` Consume `JsonStreamToken.NAME` token.
    `JsonStreamToken` | `peek()` Peek next token.
    `void` | `startArray()` Consume `JsonStreamToken.START_ARRAY` token.
    `void` | `startObject()` Consume `JsonStreamToken.START_OBJECT` token.
    `JsonStreamSource.Value` | `value()` Consume `JsonStreamToken.VALUE` token.

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

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

- - ### Constructor Detail

    - #### StreamSourceDelegate

          public StreamSourceDelegate(JsonStreamSource delegate)

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### getLineNumber

          public int getLineNumber()

      Specified by:
        `getLineNumber` in interface `Location`

    - #### getColumnNumber

          public int getColumnNumber()

      Specified by:
        `getColumnNumber` in interface `Location`

    - #### name

          public String name()
                      throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.NAME` token.
      Specified by:
        `name` in interface `JsonStreamSource`
      Returns:
        name
      Throws:
        `IOException`

    - #### getCharacterOffset

          public int getCharacterOffset()

      Specified by:
        `getCharacterOffset` in interface `Location`

    - #### value

          public JsonStreamSource.Value value()
                                       throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.VALUE` token.
      Specified by:
        `value` in interface `JsonStreamSource`
      Returns:
        value
      Throws:
        `IOException`

    - #### startObject

          public void startObject()
                           throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.START_OBJECT` token.
      Specified by:
        `startObject` in interface `JsonStreamSource`
      Throws:
        `IOException`

    - #### getPublicId

          public String getPublicId()

      Specified by:
        `getPublicId` in interface `Location`

    - #### endObject

          public void endObject()
                         throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.END_OBJECT` token.
      Specified by:
        `endObject` in interface `JsonStreamSource`
      Throws:
        `IOException`

    - #### getSystemId

          public String getSystemId()

      Specified by:
        `getSystemId` in interface `Location`

    - #### startArray

          public void startArray()
                          throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.START_ARRAY` token.
      Specified by:
        `startArray` in interface `JsonStreamSource`
      Throws:
        `IOException`

    - #### endArray

          public void endArray()
                        throws IOException

      Description copied from interface: `JsonStreamSource`
      Consume `JsonStreamToken.END_ARRAY` token.
      Specified by:
        `endArray` in interface `JsonStreamSource`
      Throws:
        `IOException`

    - #### peek

          public JsonStreamToken peek()
                               throws IOException

      Description copied from interface: `JsonStreamSource`
      Peek next token.
      Specified by:
        `peek` in interface `JsonStreamSource`
      Returns:
        token
      Throws:
        `IOException`

    - #### copy

          public void copy(JsonStreamTarget target)
                    throws IOException

      Copy events to given target until `peek() == JsonStreamToken.NONE`. This method does not close streams.
      Parameters:
        `target` -
      Throws:
        `IOException`

Copyright © 2005–2023 Apache Software Foundation. All rights reserved.