public abstract class JsonStreamFactory extends Object
JsonStreamSource and JsonStreamTarget) factory.
This class provides the static newFactory() method to lookup and instantiate a default
implementation using the Services API (as detailed in the JAR specification).
| Constructor and Description |
|---|
JsonStreamFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract JsonStreamSource |
createJsonStreamSource(InputStream input)
Create stream source.
|
abstract JsonStreamSource |
createJsonStreamSource(InputStream input,
Constants.SCANNER scanner)
Create stream source.
|
abstract JsonStreamSource |
createJsonStreamSource(Reader reader)
Create stream source.
|
abstract JsonStreamSource |
createJsonStreamSource(Reader reader,
Constants.SCANNER scanner)
Create stream source.
|
abstract JsonStreamTarget |
createJsonStreamTarget(OutputStream output,
boolean pretty)
Create stream target.
|
abstract JsonStreamTarget |
createJsonStreamTarget(Writer writer,
boolean pretty)
Create stream target.
|
static JsonStreamFactory |
newFactory()
Create a new instance of a JsonStreamFactory.
|
public static JsonStreamFactory newFactory() throws FactoryConfigurationError
Create a new instance of a JsonStreamFactory.
Determines the class to instantiate as follows:
FactoryConfigurationError - if a factory class cannot be found or instantiation fails.public abstract JsonStreamSource createJsonStreamSource(InputStream input) throws IOException
input - IOExceptionpublic abstract JsonStreamSource createJsonStreamSource(InputStream input, Constants.SCANNER scanner) throws IOException
input - scanner - JSON Scanner to useIOExceptionpublic abstract JsonStreamSource createJsonStreamSource(Reader reader) throws IOException
reader - IOExceptionpublic abstract JsonStreamSource createJsonStreamSource(Reader reader, Constants.SCANNER scanner) throws IOException
reader - scanner - JSON Scanner to useIOExceptionpublic abstract JsonStreamTarget createJsonStreamTarget(OutputStream output, boolean pretty) throws IOException
output - pretty - IOExceptionpublic abstract JsonStreamTarget createJsonStreamTarget(Writer writer, boolean pretty) throws IOException
writer - pretty - IOExceptionCopyright © 2005–2019 Apache Software Foundation. All rights reserved.