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:
    java.io.Closeable, java.lang.AutoCloseable, javax.xml.stream.Location, JsonStreamSource
  Direct Known Subclasses:
    AddRootSource

      public class StreamSourceDelegate
      extends java.lang.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()`
    `java.lang.String` | `getPublicId()`
    `java.lang.String` | `getSystemId()`
    `java.lang.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 java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`

    - #### getLineNumber

          public int getLineNumber()

      Specified by:
        `getLineNumber` in interface `javax.xml.stream.Location`

    - #### getColumnNumber

          public int getColumnNumber()

      Specified by:
        `getColumnNumber` in interface `javax.xml.stream.Location`

    - #### name

          public java.lang.String name()
                                throws java.io.IOException

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

    - #### getCharacterOffset

          public int getCharacterOffset()

      Specified by:
        `getCharacterOffset` in interface `javax.xml.stream.Location`

    - #### value

          public JsonStreamSource.Value value()
                                       throws java.io.IOException

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

    - #### startObject

          public void startObject()
                           throws java.io.IOException

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

    - #### getPublicId

          public java.lang.String getPublicId()

      Specified by:
        `getPublicId` in interface `javax.xml.stream.Location`

    - #### endObject

          public void endObject()
                         throws java.io.IOException

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

    - #### getSystemId

          public java.lang.String getSystemId()

      Specified by:
        `getSystemId` in interface `javax.xml.stream.Location`

    - #### startArray

          public void startArray()
                          throws java.io.IOException

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

    - #### endArray

          public void endArray()
                        throws java.io.IOException

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

    - #### peek

          public JsonStreamToken peek()
                               throws java.io.IOException

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

    - #### copy

          public void copy(JsonStreamTarget target)
                    throws java.io.IOException

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

Copyright © 2005-2021 Apache Software Foundation. All Rights Reserved.