Package org.glassfish.json
Class JsonReaderFactoryImpl
- java.lang.Object
-
- org.glassfish.json.JsonReaderFactoryImpl
-
- All Implemented Interfaces:
JsonReaderFactory
class JsonReaderFactoryImpl extends java.lang.Object implements JsonReaderFactory
-
-
Field Summary
Fields Modifier and Type Field Description private BufferPool
bufferPool
private java.util.Map<java.lang.String,?>
config
-
Constructor Summary
Constructors Constructor Description JsonReaderFactoryImpl(BufferPool bufferPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
config
private final java.util.Map<java.lang.String,?> config
-
bufferPool
private final BufferPool bufferPool
-
-
Constructor Detail
-
JsonReaderFactoryImpl
JsonReaderFactoryImpl(BufferPool bufferPool)
-
-
Method Detail
-
createReader
public JsonReader createReader(java.io.Reader reader)
Description copied from interface:JsonReaderFactory
Creates a JSON reader from a character stream. The reader is configured with the factory configuration.- Specified by:
createReader
in interfaceJsonReaderFactory
- Parameters:
reader
- a reader from which JSON is to be read- Returns:
- a JSON reader
-
createReader
public JsonReader createReader(java.io.InputStream in)
Description copied from interface:JsonReaderFactory
Creates a JSON reader from a byte stream. The character encoding of the stream is determined as described in RFC 4627. The reader is configured with the factory configuration.- Specified by:
createReader
in interfaceJsonReaderFactory
- Parameters:
in
- a byte stream from which JSON is to be read- Returns:
- a JSON reader
-
createReader
public JsonReader createReader(java.io.InputStream in, java.nio.charset.Charset charset)
Description copied from interface:JsonReaderFactory
Creates a JSON reader from a byte stream. The bytes of the stream are decoded to characters using the specified charset. The reader is configured with the factory configuration.- Specified by:
createReader
in interfaceJsonReaderFactory
- Parameters:
in
- a byte stream from which JSON is to be readcharset
- a charset- Returns:
- a JSON reader
-
getConfigInUse
public java.util.Map<java.lang.String,?> getConfigInUse()
Description copied from interface:JsonReaderFactory
Returns read-only map of supported provider specific configuration properties that are used to configure the created JSON readers. If there are any specified configuration properties that are not supported by the provider, they won't be part of the returned map.- Specified by:
getConfigInUse
in interfaceJsonReaderFactory
- Returns:
- a map of supported provider specific properties that are used to configure the readers. The map be empty but not null.
-
-