Package 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
  Description
  `JsonStreamFactoryImpl()`
  Create instance.
  `JsonStreamFactoryImpl(String prettySpace, String prettyIndent, String prettyNewline)`
  Create instance.

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### 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 Details

  - ### createJsonStreamSource

    public JsonStreamSource createJsonStreamSource(InputStream input) throws IOException
    Description copied from class: `JsonStreamFactory`
    Create stream source.
    Specified by:
      `createJsonStreamSource` in class `JsonStreamFactory`
    Parameters:
      `input` -
    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`
    Parameters:
      `input` -
      `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`
    Parameters:
      `reader` -
    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`
    Parameters:
      `reader` -
      `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`
    Parameters:
      `output` -
      `pretty` -
    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`
    Parameters:
      `writer` -
      `pretty` -
    Returns:
      stream target