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

## Class JsonStreamFactoryImpl

- java.lang.Object
- - org.apache.synapse.commons.staxon.core.json.stream.JsonStreamFactory
  - - org.apache.synapse.commons.staxon.core.json.stream.impl.JsonStreamFactoryImpl

-     public class JsonStreamFactoryImpl
      extends JsonStreamFactory

  Default `JsonStreamFactory` implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonStreamFactoryImpl()` Create instance.
    `JsonStreamFactoryImpl(String prettySpace, String prettyIndent, String prettyNewline)` Create instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonStreamSource` | `createJsonStreamSource(InputStream input)` Create stream source.
    `JsonStreamSource` | `createJsonStreamSource(InputStream input, Constants.SCANNER scanner)` Create stream source.
    `JsonStreamSource` | `createJsonStreamSource(Reader reader)` Create stream source.
    `JsonStreamSource` | `createJsonStreamSource(Reader reader, Constants.SCANNER scanner)` Create stream source.
    `JsonStreamTarget` | `createJsonStreamTarget(OutputStream output, boolean pretty)` Create stream target.
    `JsonStreamTarget` | `createJsonStreamTarget(Writer writer, boolean pretty)` Create stream target.

    - ### Methods inherited from class org.apache.synapse.commons.staxon.core.json.stream.JsonStreamFactory

      `newFactory`

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

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

- - ### Constructor Detail

    - #### JsonStreamFactoryImpl

          public JsonStreamFactoryImpl()

      Create instance. Petty printing will use `"\t"` for indentation (per level), `"\n"` as line separator and `" "` to decorate colons, commas, etc.

    - #### JsonStreamFactoryImpl

          public JsonStreamFactoryImpl(String prettySpace,
                                       String prettyIndent,
                                       String prettyNewline)

      Create instance.
      Parameters:
        `prettySpace` - inserted around colons, commas, etc
        `prettyIndent` - indentation per depth level
        `prettyNewline` - newline character sequence

  - ### Method Detail

    - #### createJsonStreamSource

          public JsonStreamSource createJsonStreamSource(InputStream input)
                                                  throws IOException

      Description copied from class: `JsonStreamFactory`
      Create stream source.
      Specified by:
        `createJsonStreamSource` in class `JsonStreamFactory`
      Returns:
        stream source
      Throws:
        `IOException`

    - #### createJsonStreamSource

          public JsonStreamSource createJsonStreamSource(InputStream input,
                                                         Constants.SCANNER scanner)
                                                  throws IOException

      Description copied from class: `JsonStreamFactory`
      Create stream source.
      Specified by:
        `createJsonStreamSource` in class `JsonStreamFactory`
        `scanner` - JSON Scanner to use
      Returns:
        stream source
      Throws:
        `IOException`

    - #### createJsonStreamSource

          public JsonStreamSource createJsonStreamSource(Reader reader)

      Description copied from class: `JsonStreamFactory`
      Create stream source.
      Specified by:
        `createJsonStreamSource` in class `JsonStreamFactory`
      Returns:
        stream source

    - #### createJsonStreamSource

          public JsonStreamSource createJsonStreamSource(Reader reader,
                                                         Constants.SCANNER scanner)

      Description copied from class: `JsonStreamFactory`
      Create stream source.
      Specified by:
        `createJsonStreamSource` in class `JsonStreamFactory`
        `scanner` - JSON Scanner to use
      Returns:
        stream source

    - #### createJsonStreamTarget

          public JsonStreamTarget createJsonStreamTarget(OutputStream output,
                                                         boolean pretty)
                                                  throws IOException

      Description copied from class: `JsonStreamFactory`
      Create stream target.
      Specified by:
        `createJsonStreamTarget` in class `JsonStreamFactory`
      Returns:
        stream target
      Throws:
        `IOException`

    - #### createJsonStreamTarget

          public JsonStreamTarget createJsonStreamTarget(Writer writer,
                                                         boolean pretty)

      Description copied from class: `JsonStreamFactory`
      Create stream target.
      Specified by:
        `createJsonStreamTarget` in class `JsonStreamFactory`
      Returns:
        stream target

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