public interface JsonReaderFactory
JsonReader
instances. If a factory
instance is configured with some configuration, that would be
used to configure the created reader instances.
JsonReader
can also be created using Json
's
createReader
methods. If multiple reader instances are created,
then creating them using a reader factory is preferred.
For example:
JsonReaderFactory factory = Json.createReaderFactory(...);
JsonReader reader1 = factory.createReader(...);
JsonReader reader2 = factory.createReader(...);
All the methods in this class are safe for use by multiple concurrent threads.
Modifier and Type | Method and Description |
---|---|
JsonReader |
createReader(InputStream in)
Creates a JSON reader from a byte stream.
|
JsonReader |
createReader(InputStream in,
Charset charset)
Creates a JSON reader from a byte stream.
|
JsonReader |
createReader(Reader reader)
Creates a JSON reader from a character stream.
|
Map<String,?> |
getConfigInUse()
Returns read-only map of supported provider specific configuration
properties that are used to configure the created JSON readers.
|
JsonReader createReader(Reader reader)
reader
- a reader from which JSON is to be readJsonReader createReader(InputStream in)
in
- a byte stream from which JSON is to be readJsonReader createReader(InputStream in, Charset charset)
in
- a byte stream from which JSON is to be readcharset
- a charsetMap<String,?> getConfigInUse()
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.