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(java.io.InputStream in)
Creates a JSON reader from a byte stream.
|
JsonReader |
createReader(java.io.InputStream in,
java.nio.charset.Charset charset)
Creates a JSON reader from a byte stream.
|
JsonReader |
createReader(java.io.Reader reader)
Creates a JSON reader from a character stream.
|
java.util.Map<java.lang.String,?> |
getConfigInUse()
Returns read-only map of supported provider specific configuration
properties that are used to configure the created JSON readers.
|
JsonReader createReader(java.io.Reader reader)
reader
- a reader from which JSON is to be readJsonReader createReader(java.io.InputStream in)
in
- a byte stream from which JSON is to be readJsonReader createReader(java.io.InputStream in, java.nio.charset.Charset charset)
in
- a byte stream from which JSON is to be readcharset
- a charsetjava.util.Map<java.lang.String,?> getConfigInUse()