Package org.apache.johnzon.core
Class JsonGeneratorFactoryImpl
- java.lang.Object
-
- org.apache.johnzon.core.AbstractJsonFactory
-
- org.apache.johnzon.core.JsonGeneratorFactoryImpl
-
- All Implemented Interfaces:
jakarta.json.stream.JsonGeneratorFactory
,Serializable
public class JsonGeneratorFactoryImpl extends AbstractJsonFactory implements jakarta.json.stream.JsonGeneratorFactory
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JsonGeneratorFactoryImpl.Buffer
-
Field Summary
Fields Modifier and Type Field Description static String
BOUNDED_OUTPUT_STREAM_WRITER_LEN
private int
boundedOutputStreamWriter
private JsonGeneratorFactoryImpl.Buffer
buffer
private JsonGeneratorFactoryImpl.Buffer
customBuffer
static int
DEFAULT_GENERATOR_BUFFER_LENGTH
private Charset
defaultEncoding
static String
GENERATOR_BUFFER_LENGTH
private boolean
pretty
(package private) static Collection<String>
SUPPORTED_CONFIG_KEYS
-
Fields inherited from class org.apache.johnzon.core.AbstractJsonFactory
BUFFER_STRATEGY, DEFAULT_BUFFER_STRATEGY, ENCODING, internalConfig
-
-
Constructor Summary
Constructors Constructor Description JsonGeneratorFactoryImpl(Map<String,?> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.json.stream.JsonGenerator
createGenerator(OutputStream out)
jakarta.json.stream.JsonGenerator
createGenerator(OutputStream out, Charset charset)
jakarta.json.stream.JsonGenerator
createGenerator(Writer writer)
private BufferStrategy.BufferProvider<char[]>
getBufferProvider(Flushable flushable)
Map<String,?>
getConfigInUse()
Charset
getDefaultEncoding()
-
Methods inherited from class org.apache.johnzon.core.AbstractJsonFactory
getBool, getBufferProvider, getInt, getString
-
-
-
-
Field Detail
-
GENERATOR_BUFFER_LENGTH
public static final String GENERATOR_BUFFER_LENGTH
- See Also:
- Constant Field Values
-
BOUNDED_OUTPUT_STREAM_WRITER_LEN
public static final String BOUNDED_OUTPUT_STREAM_WRITER_LEN
- See Also:
- Constant Field Values
-
DEFAULT_GENERATOR_BUFFER_LENGTH
public static final int DEFAULT_GENERATOR_BUFFER_LENGTH
-
SUPPORTED_CONFIG_KEYS
static final Collection<String> SUPPORTED_CONFIG_KEYS
-
defaultEncoding
private final Charset defaultEncoding
-
pretty
private final boolean pretty
-
boundedOutputStreamWriter
private final int boundedOutputStreamWriter
-
buffer
private final JsonGeneratorFactoryImpl.Buffer buffer
-
customBuffer
private volatile JsonGeneratorFactoryImpl.Buffer customBuffer
-
-
Method Detail
-
createGenerator
public jakarta.json.stream.JsonGenerator createGenerator(Writer writer)
- Specified by:
createGenerator
in interfacejakarta.json.stream.JsonGeneratorFactory
-
createGenerator
public jakarta.json.stream.JsonGenerator createGenerator(OutputStream out)
- Specified by:
createGenerator
in interfacejakarta.json.stream.JsonGeneratorFactory
-
createGenerator
public jakarta.json.stream.JsonGenerator createGenerator(OutputStream out, Charset charset)
- Specified by:
createGenerator
in interfacejakarta.json.stream.JsonGeneratorFactory
-
getConfigInUse
public Map<String,?> getConfigInUse()
- Specified by:
getConfigInUse
in interfacejakarta.json.stream.JsonGeneratorFactory
-
getDefaultEncoding
public Charset getDefaultEncoding()
-
getBufferProvider
private BufferStrategy.BufferProvider<char[]> getBufferProvider(Flushable flushable)
-
-