Package org.glassfish.json
Class JsonParserFactoryImpl
- java.lang.Object
-
- org.glassfish.json.JsonParserFactoryImpl
-
- All Implemented Interfaces:
JsonParserFactory
class JsonParserFactoryImpl extends java.lang.Object implements JsonParserFactory
-
-
Field Summary
Fields Modifier and Type Field Description private BufferPool
bufferPool
private java.util.Map<java.lang.String,?>
config
-
Constructor Summary
Constructors Constructor Description JsonParserFactoryImpl(BufferPool bufferPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonParser
createParser(java.io.InputStream in)
Creates a JSON parser from the specified byte stream.JsonParser
createParser(java.io.InputStream in, java.nio.charset.Charset charset)
Creates a JSON parser from the specified byte stream.JsonParser
createParser(java.io.Reader reader)
Creates a JSON parser from a character stream.JsonParser
createParser(JsonArray array)
Creates a JSON parser from the specified JSON array.JsonParser
createParser(JsonObject object)
Creates a JSON parser from the specified JSON object.java.util.Map<java.lang.String,?>
getConfigInUse()
Returns a read-only map of supported provider specific configuration properties that are used to configure the JSON parsers.
-
-
-
Field Detail
-
config
private final java.util.Map<java.lang.String,?> config
-
bufferPool
private final BufferPool bufferPool
-
-
Constructor Detail
-
JsonParserFactoryImpl
JsonParserFactoryImpl(BufferPool bufferPool)
-
-
Method Detail
-
createParser
public JsonParser createParser(java.io.Reader reader)
Description copied from interface:JsonParserFactory
Creates a JSON parser from a character stream.- Specified by:
createParser
in interfaceJsonParserFactory
- Parameters:
reader
- a i/o reader from which JSON is to be read- Returns:
- the created JSON parser
-
createParser
public JsonParser createParser(java.io.InputStream in)
Description copied from interface:JsonParserFactory
Creates a JSON parser from the specified byte stream. The character encoding of the stream is determined as specified in RFC 7159.- Specified by:
createParser
in interfaceJsonParserFactory
- Parameters:
in
- i/o stream from which JSON is to be read- Returns:
- the created JSON parser
-
createParser
public JsonParser createParser(java.io.InputStream in, java.nio.charset.Charset charset)
Description copied from interface:JsonParserFactory
Creates a JSON parser from the specified byte stream. The bytes of the stream are decoded to characters using the specified charset.- Specified by:
createParser
in interfaceJsonParserFactory
- Parameters:
in
- i/o stream from which JSON is to be readcharset
- a charset- Returns:
- the created JSON parser
-
createParser
public JsonParser createParser(JsonArray array)
Description copied from interface:JsonParserFactory
Creates a JSON parser from the specified JSON array.- Specified by:
createParser
in interfaceJsonParserFactory
- Parameters:
array
- a JSON array- Returns:
- the created JSON parser
-
getConfigInUse
public java.util.Map<java.lang.String,?> getConfigInUse()
Description copied from interface:JsonParserFactory
Returns a read-only map of supported provider specific configuration properties that are used to configure the JSON parsers. 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 interfaceJsonParserFactory
- Returns:
- a map of supported provider specific properties that are used to configure the created parsers. The map may be empty but not null
-
createParser
public JsonParser createParser(JsonObject object)
Description copied from interface:JsonParserFactory
Creates a JSON parser from the specified JSON object.- Specified by:
createParser
in interfaceJsonParserFactory
- Parameters:
object
- a JSON object- Returns:
- the created JSON parser
-
-