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(Reader reader)
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(Reader reader) throws IOException
reader - IOExceptionpublic abstract JsonStreamTarget createJsonStreamTarget(OutputStream output, boolean pretty) throws IOException
output - pretty - IOExceptionpublic abstract JsonStreamTarget createJsonStreamTarget(Writer writer, boolean pretty) throws IOException
writer - pretty - IOExceptionCopyright © 2011-2014. All Rights Reserved.